Skip to content

Commit

Permalink
auto merge of rust-lang#6741 : pcwalton/rust/intra-crate-start, r=gra…
Browse files Browse the repository at this point in the history
…ydon

r? @brson
  • Loading branch information
bors committed May 28, 2013
2 parents e6a838d + cf34f9f commit 2061ce9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/librustc/middle/trans/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2339,9 +2339,7 @@ pub fn create_entry_wrapper(ccx: @CrateContext,
llvm::LLVMPositionBuilderAtEnd(bld, llbb);
let start_def_id = ccx.tcx.lang_items.start_fn();
if start_def_id.crate == ast::local_crate {
ccx.sess.bug("start lang item is never in the local crate")
} else {
if start_def_id.crate != ast::local_crate {
let start_fn_type = csearch::get_type(ccx.tcx,
start_def_id).ty;
trans_external_path(ccx, start_def_id, start_fn_type);
Expand All @@ -2358,8 +2356,7 @@ pub fn create_entry_wrapper(ccx: @CrateContext,
let (start_fn, args) = if use_start_lang_item {
let start_def_id = ccx.tcx.lang_items.start_fn();
let start_fn = if start_def_id.crate == ast::local_crate {
ccx.sess.bug("start lang item is never in the local \
crate")
get_item_val(ccx, start_def_id.node)
} else {
let start_fn_type = csearch::get_type(ccx.tcx,
start_def_id).ty;
Expand Down

0 comments on commit 2061ce9

Please sign in to comment.