File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
src/librustc/middle/trans Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -2339,9 +2339,7 @@ pub fn create_entry_wrapper(ccx: @CrateContext,
23392339 llvm::LLVMPositionBuilderAtEnd(bld, llbb);
23402340
23412341 let start_def_id = ccx.tcx.lang_items.start_fn();
2342- if start_def_id.crate == ast::local_crate {
2343- ccx.sess.bug(" start lang item is never in the local crate ")
2344- } else {
2342+ if start_def_id.crate != ast::local_crate {
23452343 let start_fn_type = csearch::get_type(ccx.tcx,
23462344 start_def_id).ty;
23472345 trans_external_path(ccx, start_def_id, start_fn_type);
@@ -2358,8 +2356,7 @@ pub fn create_entry_wrapper(ccx: @CrateContext,
23582356 let (start_fn, args) = if use_start_lang_item {
23592357 let start_def_id = ccx.tcx.lang_items.start_fn();
23602358 let start_fn = if start_def_id.crate == ast::local_crate {
2361- ccx.sess.bug(" start lang item is never in the local \
2362- crate ")
2359+ get_item_val(ccx, start_def_id.node)
23632360 } else {
23642361 let start_fn_type = csearch::get_type(ccx.tcx,
23652362 start_def_id).ty;
You can’t perform that action at this time.
0 commit comments