@@ -142,7 +142,7 @@ fn entry_point_type(sess: &Session, item: &ast::Item, depth: usize) -> EntryPoin
142142 ast:: ItemKind :: Fn ( ..) => {
143143 if sess. contains_name ( & item. attrs , sym:: start) {
144144 EntryPointType :: Start
145- } else if sess. contains_name ( & item. attrs , sym:: main ) {
145+ } else if sess. contains_name ( & item. attrs , sym:: rustc_main ) {
146146 EntryPointType :: MainAttr
147147 } else if item. ident . name == sym:: main {
148148 if depth == 1 {
@@ -187,7 +187,7 @@ impl<'a> MutVisitor for EntryPointCleaner<'a> {
187187 let attrs = attrs
188188 . into_iter ( )
189189 . filter ( |attr| {
190- !self . sess . check_name ( attr, sym:: main )
190+ !self . sess . check_name ( attr, sym:: rustc_main )
191191 && !self . sess . check_name ( attr, sym:: start)
192192 } )
193193 . chain ( iter:: once ( allow_dead_code) )
@@ -220,7 +220,7 @@ fn generate_test_harness(
220220 let expn_id = ext_cx. resolver . expansion_for_ast_pass (
221221 DUMMY_SP ,
222222 AstPass :: TestHarness ,
223- & [ sym:: main , sym :: test, sym:: rustc_attrs] ,
223+ & [ sym:: test, sym:: rustc_attrs] ,
224224 None ,
225225 ) ;
226226 let def_site = DUMMY_SP . with_def_site_ctxt ( expn_id) ;
@@ -247,7 +247,7 @@ fn generate_test_harness(
247247/// By default this expands to
248248///
249249/// ```
250- /// #[main ]
250+ /// #[rustc_main ]
251251/// pub fn main() {
252252/// extern crate test;
253253/// test::test_main_static(&[
@@ -297,8 +297,8 @@ fn mk_main(cx: &mut TestCtxt<'_>) -> P<ast::Item> {
297297 let test_extern_stmt =
298298 ecx. stmt_item ( sp, ecx. item ( sp, test_id, vec ! [ ] , ast:: ItemKind :: ExternCrate ( None ) ) ) ;
299299
300- // #[main ]
301- let main_meta = ecx. meta_word ( sp, sym:: main ) ;
300+ // #[rustc_main ]
301+ let main_meta = ecx. meta_word ( sp, sym:: rustc_main ) ;
302302 let main_attr = ecx. attribute ( main_meta) ;
303303
304304 // pub fn main() { ... }
0 commit comments