@@ -2127,28 +2127,27 @@ pub fn is_entry_fn(sess: &Session, node_id: ast::NodeId) -> bool {
2127
2127
/// Create the `main` function which will initialise the rust runtime and call users’ main
2128
2128
/// function.
2129
2129
pub fn create_entry_wrapper ( ccx : & CrateContext ,
2130
- _sp : Span ,
2130
+ sp : Span ,
2131
2131
main_llfn : ValueRef ) {
2132
2132
let et = ccx. sess ( ) . entry_type . get ( ) . unwrap ( ) ;
2133
2133
match et {
2134
2134
config:: EntryMain => {
2135
- create_entry_fn ( ccx, _sp , main_llfn, true ) ;
2135
+ create_entry_fn ( ccx, sp , main_llfn, true ) ;
2136
2136
}
2137
- config:: EntryStart => create_entry_fn ( ccx, _sp , main_llfn, false ) ,
2137
+ config:: EntryStart => create_entry_fn ( ccx, sp , main_llfn, false ) ,
2138
2138
config:: EntryNone => { } // Do nothing.
2139
2139
}
2140
2140
2141
- #[ inline( never) ]
2142
2141
fn create_entry_fn ( ccx : & CrateContext ,
2143
- _sp : Span ,
2142
+ sp : Span ,
2144
2143
rust_main : ValueRef ,
2145
2144
use_start_lang_item : bool ) {
2146
2145
let llfty = Type :: func ( & [ ccx. int_type ( ) , Type :: i8p ( ccx) . ptr_to ( ) ] ,
2147
2146
& ccx. int_type ( ) ) ;
2148
2147
2149
2148
let llfn = declare:: define_cfn ( ccx, "main" , llfty,
2150
2149
ty:: mk_nil ( ccx. tcx ( ) ) ) . unwrap_or_else ( ||{
2151
- ccx. sess ( ) . span_err ( _sp , "entry symbol `main` defined multiple times" ) ;
2150
+ ccx. sess ( ) . span_err ( sp , "entry symbol `main` defined multiple times" ) ;
2152
2151
// FIXME: We should be smart and show a better diagnostic here.
2153
2152
ccx. sess ( ) . help ( "did you use #[no_mangle] on `fn main`? Use #[start] instead" ) ;
2154
2153
ccx. sess ( ) . abort_if_errors ( ) ;
0 commit comments