diff options
| -rw-r--r-- | src/librustc_trans/trans/base.rs | 11 | ||||
| -rw-r--r-- | src/librustc_trans/trans/declare.rs | 2 |
2 files changed, 5 insertions, 8 deletions
diff --git a/src/librustc_trans/trans/base.rs b/src/librustc_trans/trans/base.rs index c7200fc8bb2..0f87af65c75 100644 --- a/src/librustc_trans/trans/base.rs +++ b/src/librustc_trans/trans/base.rs @@ -2127,20 +2127,19 @@ pub fn is_entry_fn(sess: &Session, node_id: ast::NodeId) -> bool { /// Create the `main` function which will initialise the rust runtime and call users’ main /// function. pub fn create_entry_wrapper(ccx: &CrateContext, - _sp: Span, + sp: Span, main_llfn: ValueRef) { let et = ccx.sess().entry_type.get().unwrap(); match et { config::EntryMain => { - create_entry_fn(ccx, _sp, main_llfn, true); + create_entry_fn(ccx, sp, main_llfn, true); } - config::EntryStart => create_entry_fn(ccx, _sp, main_llfn, false), + config::EntryStart => create_entry_fn(ccx, sp, main_llfn, false), config::EntryNone => {} // Do nothing. } - #[inline(never)] fn create_entry_fn(ccx: &CrateContext, - _sp: Span, + sp: Span, rust_main: ValueRef, use_start_lang_item: bool) { let llfty = Type::func(&[ccx.int_type(), Type::i8p(ccx).ptr_to()], @@ -2148,7 +2147,7 @@ pub fn create_entry_wrapper(ccx: &CrateContext, let llfn = declare::define_cfn(ccx, "main", llfty, ty::mk_nil(ccx.tcx())).unwrap_or_else(||{ - ccx.sess().span_err(_sp, "entry symbol `main` defined multiple times"); + ccx.sess().span_err(sp, "entry symbol `main` defined multiple times"); // FIXME: We should be smart and show a better diagnostic here. ccx.sess().help("did you use #[no_mangle] on `fn main`? Use #[start] instead"); ccx.sess().abort_if_errors(); diff --git a/src/librustc_trans/trans/declare.rs b/src/librustc_trans/trans/declare.rs index 147b5161a4a..9e7449f670f 100644 --- a/src/librustc_trans/trans/declare.rs +++ b/src/librustc_trans/trans/declare.rs @@ -19,8 +19,6 @@ //! ValueRef they return. //! * Use define_* family of methods when you might be defining the ValueRef. //! * When in doubt, define. -#![allow(dead_code)] - use llvm::{self, ValueRef}; use middle::ty::{self, ClosureTyper}; use syntax::abi; |
