@@ -2172,28 +2172,27 @@ pub fn is_entry_fn(sess: &Session, node_id: ast::NodeId) -> bool {
2172
2172
/// Create the `main` function which will initialise the rust runtime and call users’ main
2173
2173
/// function.
2174
2174
pub fn create_entry_wrapper ( ccx : & CrateContext ,
2175
- _sp : Span ,
2175
+ sp : Span ,
2176
2176
main_llfn : ValueRef ) {
2177
2177
let et = ccx. sess ( ) . entry_type . get ( ) . unwrap ( ) ;
2178
2178
match et {
2179
2179
config:: EntryMain => {
2180
- create_entry_fn ( ccx, _sp , main_llfn, true ) ;
2180
+ create_entry_fn ( ccx, sp , main_llfn, true ) ;
2181
2181
}
2182
- config:: EntryStart => create_entry_fn ( ccx, _sp , main_llfn, false ) ,
2182
+ config:: EntryStart => create_entry_fn ( ccx, sp , main_llfn, false ) ,
2183
2183
config:: EntryNone => { } // Do nothing.
2184
2184
}
2185
2185
2186
- #[ inline( never) ]
2187
2186
fn create_entry_fn ( ccx : & CrateContext ,
2188
- _sp : Span ,
2187
+ sp : Span ,
2189
2188
rust_main : ValueRef ,
2190
2189
use_start_lang_item : bool ) {
2191
2190
let llfty = Type :: func ( & [ ccx. int_type ( ) , Type :: i8p ( ccx) . ptr_to ( ) ] ,
2192
2191
& ccx. int_type ( ) ) ;
2193
2192
2194
2193
let llfn = declare:: define_cfn ( ccx, "main" , llfty,
2195
2194
ty:: mk_nil ( ccx. tcx ( ) ) ) . unwrap_or_else ( ||{
2196
- ccx. sess ( ) . span_err ( _sp , "entry symbol `main` defined multiple times" ) ;
2195
+ ccx. sess ( ) . span_err ( sp , "entry symbol `main` defined multiple times" ) ;
2197
2196
// FIXME: We should be smart and show a better diagnostic here.
2198
2197
ccx. sess ( ) . help ( "did you use #[no_mangle] on `fn main`? Use #[start] instead" ) ;
2199
2198
ccx. sess ( ) . abort_if_errors ( ) ;
0 commit comments