@@ -62,7 +62,6 @@ use middle::trans::shape::*;
6262use middle:: trans:: tvec;
6363use middle:: trans:: type_of:: * ;
6464use util:: common:: indenter;
65- use util:: common:: is_main_name;
6665use util:: ppaux:: { ty_to_str, ty_to_short_str} ;
6766use util:: ppaux;
6867
@@ -2191,14 +2190,9 @@ fn is_main_fn(sess: &Session, node_id: ast::node_id) -> bool {
21912190
21922191// Create a _rust_main(args: ~[str]) function which will be called from the
21932192// 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 ) {
21992194
22002195 let llfn = create_main ( ccx, main_llfn) ;
2201- ccx. main_fn = Some ( llfn) ;
22022196 create_entry_fn ( ccx, llfn) ;
22032197
22042198 fn create_main ( ccx : @crate_ctxt , main_llfn : ValueRef ) -> ValueRef {
@@ -3008,7 +3002,6 @@ fn trans_crate(sess: session::Session,
30083002 exp_map2 : emap2,
30093003 reachable : reachable,
30103004 item_symbols : HashMap ( ) ,
3011- mut main_fn : None :: < ValueRef > ,
30123005 link_meta : link_meta,
30133006 enum_sizes : ty:: new_ty_hash ( ) ,
30143007 discrims : HashMap ( ) ,
0 commit comments