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 @@ -2329,9 +2329,7 @@ pub fn create_entry_wrapper(ccx: @CrateContext,
2329
2329
llvm::LLVMPositionBuilderAtEnd(bld, llbb);
2330
2330
2331
2331
let start_def_id = ccx.tcx.lang_items.start_fn();
2332
- if start_def_id.crate == ast::local_crate {
2333
- ccx.sess.bug(" start lang item is never in the local crate ")
2334
- } else {
2332
+ if start_def_id.crate != ast::local_crate {
2335
2333
let start_fn_type = csearch::get_type(ccx.tcx,
2336
2334
start_def_id).ty;
2337
2335
trans_external_path(ccx, start_def_id, start_fn_type);
@@ -2348,8 +2346,7 @@ pub fn create_entry_wrapper(ccx: @CrateContext,
2348
2346
let (start_fn, args) = if use_start_lang_item {
2349
2347
let start_def_id = ccx.tcx.lang_items.start_fn();
2350
2348
let start_fn = if start_def_id.crate == ast::local_crate {
2351
- ccx.sess.bug(" start lang item is never in the local \
2352
- crate ")
2349
+ get_item_val(ccx, start_def_id.node)
2353
2350
} else {
2354
2351
let start_fn_type = csearch::get_type(ccx.tcx,
2355
2352
start_def_id).ty;
You can’t perform that action at this time.
0 commit comments