diff options
| author | Ralf Jung <post@ralfj.de> | 2024-12-14 09:13:12 +0100 | 
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2025-01-21 06:59:15 -0700 | 
| commit | 56c90dc31e86bbaf486826a21a33d7c56e8f742f (patch) | |
| tree | 6b953e5db742226ed1297f87196a69c1d51bd1d7 /compiler/rustc_builtin_macros/src/test_harness.rs | |
| parent | 341f60327fa5302732a4be366949c16f91870b6a (diff) | |
| download | rust-56c90dc31e86bbaf486826a21a33d7c56e8f742f.tar.gz rust-56c90dc31e86bbaf486826a21a33d7c56e8f742f.zip | |
remove support for the #[start] attribute
Diffstat (limited to 'compiler/rustc_builtin_macros/src/test_harness.rs')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/test_harness.rs | 7 | 
1 files changed, 3 insertions, 4 deletions
| diff --git a/compiler/rustc_builtin_macros/src/test_harness.rs b/compiler/rustc_builtin_macros/src/test_harness.rs index 46446598943..31b068bd33d 100644 --- a/compiler/rustc_builtin_macros/src/test_harness.rs +++ b/compiler/rustc_builtin_macros/src/test_harness.rs @@ -204,11 +204,11 @@ impl<'a> MutVisitor for EntryPointCleaner<'a> { ast::mut_visit::walk_item(self, item); self.depth -= 1; - // Remove any #[rustc_main] or #[start] from the AST so it doesn't + // Remove any #[rustc_main] from the AST so it doesn't // clash with the one we're going to add, but mark it as // #[allow(dead_code)] to avoid printing warnings. match entry_point_type(&item, self.depth == 0) { - EntryPointType::MainNamed | EntryPointType::RustcMainAttr | EntryPointType::Start => { + EntryPointType::MainNamed | EntryPointType::RustcMainAttr => { let allow_dead_code = attr::mk_attr_nested_word( &self.sess.psess.attr_id_generator, ast::AttrStyle::Outer, @@ -217,8 +217,7 @@ impl<'a> MutVisitor for EntryPointCleaner<'a> { sym::dead_code, self.def_site, ); - item.attrs - .retain(|attr| !attr.has_name(sym::rustc_main) && !attr.has_name(sym::start)); + item.attrs.retain(|attr| !attr.has_name(sym::rustc_main)); item.attrs.push(allow_dead_code); } EntryPointType::None | EntryPointType::OtherMain => {} | 
