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,
2339
2339
llvm::LLVMPositionBuilderAtEnd(bld, llbb);
2340
2340
2341
2341
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 {
2345
2343
let start_fn_type = csearch::get_type(ccx.tcx,
2346
2344
start_def_id).ty;
2347
2345
trans_external_path(ccx, start_def_id, start_fn_type);
@@ -2358,8 +2356,7 @@ pub fn create_entry_wrapper(ccx: @CrateContext,
2358
2356
let (start_fn, args) = if use_start_lang_item {
2359
2357
let start_def_id = ccx.tcx.lang_items.start_fn();
2360
2358
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)
2363
2360
} else {
2364
2361
let start_fn_type = csearch::get_type(ccx.tcx,
2365
2362
start_def_id).ty;
You can’t perform that action at this time.
0 commit comments