@@ -62,7 +62,6 @@ use middle::trans::shape::*;
62
62
use middle:: trans:: tvec;
63
63
use middle:: trans:: type_of:: * ;
64
64
use util:: common:: indenter;
65
- use util:: common:: is_main_name;
66
65
use util:: ppaux:: { ty_to_str, ty_to_short_str} ;
67
66
use util:: ppaux;
68
67
@@ -2191,14 +2190,9 @@ fn is_main_fn(sess: &Session, node_id: ast::node_id) -> bool {
2191
2190
2192
2191
// Create a _rust_main(args: ~[str]) function which will be called from the
2193
2192
// runtime rust_start function
2194
- fn create_main_wrapper ( ccx : @crate_ctxt , sp : span , main_llfn : ValueRef ) {
2195
-
2196
- if ccx. main_fn != None :: < ValueRef > {
2197
- ccx. sess . span_fatal ( sp, ~"multiple ' main' functions") ;
2198
- }
2193
+ fn create_main_wrapper ( ccx : @crate_ctxt , _sp : span , main_llfn : ValueRef ) {
2199
2194
2200
2195
let llfn = create_main ( ccx, main_llfn) ;
2201
- ccx. main_fn = Some ( llfn) ;
2202
2196
create_entry_fn ( ccx, llfn) ;
2203
2197
2204
2198
fn create_main ( ccx : @crate_ctxt , main_llfn : ValueRef ) -> ValueRef {
@@ -3008,7 +3002,6 @@ fn trans_crate(sess: session::Session,
3008
3002
exp_map2 : emap2,
3009
3003
reachable : reachable,
3010
3004
item_symbols : HashMap ( ) ,
3011
- mut main_fn : None :: < ValueRef > ,
3012
3005
link_meta : link_meta,
3013
3006
enum_sizes : ty:: new_ty_hash ( ) ,
3014
3007
discrims : HashMap ( ) ,
0 commit comments