about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorSimonas Kazlauskas <git@kazlauskas.me>2015-03-04 11:46:55 +0200
committerSimonas Kazlauskas <git@kazlauskas.me>2015-04-03 15:48:07 +0300
commitd8d59a954ff75e7e62088007a70fbd3048db2bf3 (patch)
treec1376cac52c88f75fc65343d34b5dce0e3c878b3 /src
parent8943709221f745cdd58d9a19e9fd280ae53091c6 (diff)
downloadrust-d8d59a954ff75e7e62088007a70fbd3048db2bf3.tar.gz
rust-d8d59a954ff75e7e62088007a70fbd3048db2bf3.zip
Address Alex’s comments
Diffstat (limited to 'src')
-rw-r--r--src/librustc_trans/trans/base.rs11
-rw-r--r--src/librustc_trans/trans/declare.rs2
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;