From a501308ec1601c2b1d50230a061fb2700940727d Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Fri, 14 May 2021 15:37:53 +0200 Subject: [PATCH] Replace #[plugin_registrar] with exporting __rustc_plugin_registrar --- compiler/rustc_ast_passes/src/feature_gate.rs | 8 - .../src/back/symbol_export.rs | 4 - compiler/rustc_feature/src/active.rs | 3 - compiler/rustc_feature/src/builtin_attrs.rs | 12 - compiler/rustc_feature/src/removed.rs | 5 +- compiler/rustc_interface/src/passes.rs | 3 - compiler/rustc_metadata/src/locator.rs | 8 +- compiler/rustc_middle/src/query/mod.rs | 3 - compiler/rustc_plugin_impl/src/build.rs | 57 --- compiler/rustc_plugin_impl/src/lib.rs | 1 - compiler/rustc_plugin_impl/src/load.rs | 17 +- compiler/rustc_session/src/session.rs | 6 - compiler/rustc_symbol_mangling/src/lib.rs | 4 - .../src/language-features/plugin-registrar.md | 13 - .../src/language-features/plugin.md | 9 +- .../ui-fulldeps/auxiliary/empty-plugin.rs | 5 +- .../auxiliary/issue-40001-plugin.rs | 9 +- .../auxiliary/lint-for-crate-rpass.rs | 6 +- .../ui-fulldeps/auxiliary/lint-for-crate.rs | 6 +- .../auxiliary/lint-group-plugin-test.rs | 5 +- .../ui-fulldeps/auxiliary/lint-plugin-test.rs | 5 +- .../ui-fulldeps/auxiliary/lint-tool-test.rs | 5 +- .../auxiliary/lto-syntax-extension-plugin.rs | 5 +- .../auxiliary/multiple-plugins-1.rs | 10 + .../auxiliary/multiple-plugins-2.rs | 10 + .../auxiliary/outlive-expansion-phase.rs | 5 +- .../ui-fulldeps/auxiliary/rlib-crate-test.rs | 6 +- src/test/ui-fulldeps/multiple-plugins.rs | 11 + src/test/ui-fulldeps/multiple-plugins.stderr | 16 + .../feature-gate-plugin_registrar.rs | 11 - .../feature-gate-plugin_registrar.stderr | 29 -- .../issue-43106-gating-of-builtin-attrs.rs | 39 +- ...issue-43106-gating-of-builtin-attrs.stderr | 466 ++++++++---------- src/test/ui/multiple-plugin-registrars.rs | 12 - src/test/ui/multiple-plugin-registrars.stderr | 29 -- 35 files changed, 287 insertions(+), 556 deletions(-) delete mode 100644 compiler/rustc_plugin_impl/src/build.rs delete mode 100644 src/doc/unstable-book/src/language-features/plugin-registrar.md create mode 100644 src/test/ui-fulldeps/auxiliary/multiple-plugins-1.rs create mode 100644 src/test/ui-fulldeps/auxiliary/multiple-plugins-2.rs create mode 100644 src/test/ui-fulldeps/multiple-plugins.rs create mode 100644 src/test/ui-fulldeps/multiple-plugins.stderr delete mode 100644 src/test/ui/feature-gates/feature-gate-plugin_registrar.rs delete mode 100644 src/test/ui/feature-gates/feature-gate-plugin_registrar.stderr delete mode 100644 src/test/ui/multiple-plugin-registrars.rs delete mode 100644 src/test/ui/multiple-plugin-registrars.stderr diff --git a/compiler/rustc_ast_passes/src/feature_gate.rs b/compiler/rustc_ast_passes/src/feature_gate.rs index 89b59e5f00f..6dc459ea402 100644 --- a/compiler/rustc_ast_passes/src/feature_gate.rs +++ b/compiler/rustc_ast_passes/src/feature_gate.rs @@ -375,14 +375,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { } ast::ItemKind::Fn(..) => { - if self.sess.contains_name(&i.attrs[..], sym::plugin_registrar) { - gate_feature_post!( - &self, - plugin_registrar, - i.span, - "compiler plugins are experimental and possibly buggy" - ); - } if self.sess.contains_name(&i.attrs[..], sym::start) { gate_feature_post!( &self, diff --git a/compiler/rustc_codegen_ssa/src/back/symbol_export.rs b/compiler/rustc_codegen_ssa/src/back/symbol_export.rs index 4ef21449d21..4a7090b31b4 100644 --- a/compiler/rustc_codegen_ssa/src/back/symbol_export.rs +++ b/compiler/rustc_codegen_ssa/src/back/symbol_export.rs @@ -137,10 +137,6 @@ fn reachable_non_generics_provider(tcx: TyCtxt<'_>, cnum: CrateNum) -> DefIdMap< reachable_non_generics.insert(id.to_def_id(), SymbolExportLevel::C); } - if let Some(id) = tcx.plugin_registrar_fn(()) { - reachable_non_generics.insert(id.to_def_id(), SymbolExportLevel::C); - } - reachable_non_generics } diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index 128b51c2061..73b29d65e91 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -281,9 +281,6 @@ declare_features! ( // feature-group-start: actual feature gates // ------------------------------------------------------------------------- - /// Allows using `#[plugin_registrar]` on functions. - (active, plugin_registrar, "1.0.0", Some(29597), None), - /// Allows using `#![plugin(myplugin)]`. (active, plugin, "1.0.0", Some(29597), None), diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index 49cca3fbc39..5729384c0da 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -291,18 +291,6 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ ), // Plugins: - ( - sym::plugin_registrar, Normal, template!(Word), - Gated( - Stability::Deprecated( - "https://github.com/rust-lang/rust/pull/64675", - Some("may be removed in a future compiler version"), - ), - sym::plugin_registrar, - "compiler plugins are deprecated", - cfg_fn!(plugin_registrar) - ) - ), ( sym::plugin, CrateLevel, template!(List: "name"), Gated( diff --git a/compiler/rustc_feature/src/removed.rs b/compiler/rustc_feature/src/removed.rs index 46b36f2b704..5cadbd9e5cf 100644 --- a/compiler/rustc_feature/src/removed.rs +++ b/compiler/rustc_feature/src/removed.rs @@ -136,9 +136,12 @@ declare_features! ( (removed, main, "1.53.0", Some(29634), None, None), (removed, pub_macro_rules, "1.53.0", Some(78855), None, Some("removed due to being incomplete, in particular it does not work across crates")), - /// Allows the definition of `const` functions with some advanced features. + /// Allows the definition of `const` functions with some advanced features. (removed, const_fn, "1.54.0", Some(57563), None, Some("split into finer-grained feature gates")), + /// Allows using `#[plugin_registrar]` on functions. + (removed, plugin_registrar, "1.54.0", Some(29597), None, + Some("a __rustc_plugin_registrar symbol must now be defined instead")), /// Allows `#[doc(include = "some-file")]`. (removed, external_doc, "1.54.0", Some(44732), None, diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 5db027fb5b4..5dc57f6023b 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -741,7 +741,6 @@ pub static DEFAULT_QUERY_PROVIDERS: SyncLazy = SyncLazy::new(|| { let providers = &mut Providers::default(); providers.analysis = analysis; proc_macro_decls::provide(providers); - plugin::build::provide(providers); rustc_middle::hir::provide(providers); mir::provide(providers); mir_build::provide(providers); @@ -856,8 +855,6 @@ fn analysis(tcx: TyCtxt<'_>, (): ()) -> Result<()> { { entry_point = sess.time("looking_for_entry_point", || tcx.entry_fn(())); - sess.time("looking_for_plugin_registrar", || tcx.ensure().plugin_registrar_fn(())); - sess.time("looking_for_derive_registrar", || { tcx.ensure().proc_macro_decls_static(()) }); diff --git a/compiler/rustc_metadata/src/locator.rs b/compiler/rustc_metadata/src/locator.rs index cf8577a26cf..8d1bf6f55df 100644 --- a/compiler/rustc_metadata/src/locator.rs +++ b/compiler/rustc_metadata/src/locator.rs @@ -226,7 +226,7 @@ use rustc_session::config::{self, CrateType}; use rustc_session::filesearch::{FileDoesntMatch, FileMatches, FileSearch}; use rustc_session::search_paths::PathKind; use rustc_session::utils::CanonicalizedPath; -use rustc_session::{Session, StableCrateId}; +use rustc_session::Session; use rustc_span::symbol::{sym, Symbol}; use rustc_span::Span; use rustc_target::spec::{Target, TargetTriple}; @@ -787,7 +787,7 @@ pub fn find_plugin_registrar( metadata_loader: &dyn MetadataLoader, span: Span, name: Symbol, -) -> (PathBuf, StableCrateId) { +) -> PathBuf { match find_plugin_registrar_impl(sess, metadata_loader, name) { Ok(res) => res, // `core` is always available if we got as far as loading plugins. @@ -799,7 +799,7 @@ fn find_plugin_registrar_impl<'a>( sess: &'a Session, metadata_loader: &dyn MetadataLoader, name: Symbol, -) -> Result<(PathBuf, StableCrateId), CrateError> { +) -> Result { info!("find plugin registrar `{}`", name); let mut locator = CrateLocator::new( sess, @@ -816,7 +816,7 @@ fn find_plugin_registrar_impl<'a>( match locator.maybe_load_library_crate()? { Some(library) => match library.source.dylib { - Some(dylib) => Ok((dylib.0, library.metadata.get_root().stable_crate_id())), + Some(dylib) => Ok(dylib.0), None => Err(CrateError::NonDylibPlugin(name)), }, None => Err(locator.into_error()), diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index 3c16852df05..7c7025ac37a 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -1252,9 +1252,6 @@ rustc_queries! { query entry_fn(_: ()) -> Option<(DefId, EntryFnType)> { desc { "looking up the entry function of a crate" } } - query plugin_registrar_fn(_: ()) -> Option { - desc { "looking up the plugin registrar for a crate" } - } query proc_macro_decls_static(_: ()) -> Option { desc { "looking up the derive registrar for a crate" } } diff --git a/compiler/rustc_plugin_impl/src/build.rs b/compiler/rustc_plugin_impl/src/build.rs deleted file mode 100644 index b95c4a72019..00000000000 --- a/compiler/rustc_plugin_impl/src/build.rs +++ /dev/null @@ -1,57 +0,0 @@ -//! Used by `rustc` when compiling a plugin crate. - -use rustc_hir as hir; -use rustc_hir::def_id::LocalDefId; -use rustc_hir::itemlikevisit::ItemLikeVisitor; -use rustc_middle::ty::query::Providers; -use rustc_middle::ty::TyCtxt; -use rustc_span::symbol::sym; -use rustc_span::Span; - -struct RegistrarFinder<'tcx> { - tcx: TyCtxt<'tcx>, - registrars: Vec<(LocalDefId, Span)>, -} - -impl<'v, 'tcx> ItemLikeVisitor<'v> for RegistrarFinder<'tcx> { - fn visit_item(&mut self, item: &hir::Item<'_>) { - if let hir::ItemKind::Fn(..) = item.kind { - let attrs = self.tcx.hir().attrs(item.hir_id()); - if self.tcx.sess.contains_name(attrs, sym::plugin_registrar) { - self.registrars.push((item.def_id, item.span)); - } - } - } - - fn visit_trait_item(&mut self, _trait_item: &hir::TraitItem<'_>) {} - - fn visit_impl_item(&mut self, _impl_item: &hir::ImplItem<'_>) {} - - fn visit_foreign_item(&mut self, _foreign_item: &hir::ForeignItem<'_>) {} -} - -/// Finds the function marked with `#[plugin_registrar]`, if any. -fn plugin_registrar_fn(tcx: TyCtxt<'_>, (): ()) -> Option { - let mut finder = RegistrarFinder { tcx, registrars: Vec::new() }; - tcx.hir().krate().visit_all_item_likes(&mut finder); - - let (def_id, span) = finder.registrars.pop()?; - - if !finder.registrars.is_empty() { - let diagnostic = tcx.sess.diagnostic(); - let mut e = diagnostic.struct_err("multiple plugin registration functions found"); - e.span_note(span, "one is here"); - for &(_, span) in &finder.registrars { - e.span_note(span, "one is here"); - } - e.emit(); - diagnostic.abort_if_errors(); - unreachable!(); - } - - Some(def_id) -} - -pub fn provide(providers: &mut Providers) { - *providers = Providers { plugin_registrar_fn, ..*providers }; -} diff --git a/compiler/rustc_plugin_impl/src/lib.rs b/compiler/rustc_plugin_impl/src/lib.rs index 5bf4d300e9e..a1e13a1abb6 100644 --- a/compiler/rustc_plugin_impl/src/lib.rs +++ b/compiler/rustc_plugin_impl/src/lib.rs @@ -12,7 +12,6 @@ use rustc_lint::LintStore; -pub mod build; pub mod load; /// Structure used to register plugins. diff --git a/compiler/rustc_plugin_impl/src/load.rs b/compiler/rustc_plugin_impl/src/load.rs index 687f7db221f..5da02e3a489 100644 --- a/compiler/rustc_plugin_impl/src/load.rs +++ b/compiler/rustc_plugin_impl/src/load.rs @@ -55,20 +55,13 @@ fn load_plugin( metadata_loader: &dyn MetadataLoader, ident: Ident, ) { - let (lib, disambiguator) = - locator::find_plugin_registrar(sess, metadata_loader, ident.span, ident.name); - let symbol = sess.generate_plugin_registrar_symbol(disambiguator); - let fun = dylink_registrar(sess, ident.span, lib, symbol); + let lib = locator::find_plugin_registrar(sess, metadata_loader, ident.span, ident.name); + let fun = dylink_registrar(sess, ident.span, lib); plugins.push(fun); } // Dynamically link a registrar function into the compiler process. -fn dylink_registrar( - sess: &Session, - span: Span, - path: PathBuf, - symbol: String, -) -> PluginRegistrarFn { +fn dylink_registrar(sess: &Session, span: Span, path: PathBuf) -> PluginRegistrarFn { use rustc_metadata::dynamic_lib::DynamicLibrary; // Make sure the path contains a / or the linker will search for it. @@ -83,7 +76,7 @@ fn dylink_registrar( }; unsafe { - let registrar = match lib.symbol(&symbol) { + let registrar = match lib.symbol("__rustc_plugin_registrar") { Ok(registrar) => mem::transmute::<*mut u8, PluginRegistrarFn>(registrar), // again fatal if we can't register macros Err(err) => sess.span_fatal(span, &err), @@ -91,7 +84,7 @@ fn dylink_registrar( // Intentionally leak the dynamic library. We can't ever unload it // since the library can make things that will live arbitrarily long - // (e.g., an @-box cycle or a thread). + // (e.g., an Rc cycle or a thread). mem::forget(lib); registrar diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index d5c759623e3..0b1a99922d6 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -792,12 +792,6 @@ impl Session { ) } - /// Returns the symbol name for the registrar function, - /// given the crate `Svh` and the function `DefIndex`. - pub fn generate_plugin_registrar_symbol(&self, stable_crate_id: StableCrateId) -> String { - format!("__rustc_plugin_registrar_{:08x}__", stable_crate_id.to_u64()) - } - pub fn generate_proc_macro_decls_symbol(&self, stable_crate_id: StableCrateId) -> String { format!("__rustc_proc_macro_decls_{:08x}__", stable_crate_id.to_u64()) } diff --git a/compiler/rustc_symbol_mangling/src/lib.rs b/compiler/rustc_symbol_mangling/src/lib.rs index ba59ff96f65..850d44eb339 100644 --- a/compiler/rustc_symbol_mangling/src/lib.rs +++ b/compiler/rustc_symbol_mangling/src/lib.rs @@ -164,10 +164,6 @@ fn compute_symbol_name( // FIXME(eddyb) Precompute a custom symbol name based on attributes. let is_foreign = if let Some(def_id) = def_id.as_local() { - if tcx.plugin_registrar_fn(()) == Some(def_id) { - let stable_crate_id = tcx.sess.local_stable_crate_id(); - return tcx.sess.generate_plugin_registrar_symbol(stable_crate_id); - } if tcx.proc_macro_decls_static(()) == Some(def_id) { let stable_crate_id = tcx.sess.local_stable_crate_id(); return tcx.sess.generate_proc_macro_decls_symbol(stable_crate_id); diff --git a/src/doc/unstable-book/src/language-features/plugin-registrar.md b/src/doc/unstable-book/src/language-features/plugin-registrar.md deleted file mode 100644 index bf5dd81d735..00000000000 --- a/src/doc/unstable-book/src/language-features/plugin-registrar.md +++ /dev/null @@ -1,13 +0,0 @@ -# `plugin_registrar` - -The tracking issue for this feature is: [#29597] - -[#29597]: https://github.com/rust-lang/rust/issues/29597 - -This feature is part of "compiler plugins." It will often be used with the -[`plugin`] and `rustc_private` features as well. For more details, see -their docs. - -[`plugin`]: plugin.md - ------------------------- diff --git a/src/doc/unstable-book/src/language-features/plugin.md b/src/doc/unstable-book/src/language-features/plugin.md index 44308bdfba6..040f46f8b7c 100644 --- a/src/doc/unstable-book/src/language-features/plugin.md +++ b/src/doc/unstable-book/src/language-features/plugin.md @@ -6,9 +6,7 @@ The tracking issue for this feature is: [#29597] This feature is part of "compiler plugins." It will often be used with the -[`plugin_registrar`] and `rustc_private` features. - -[`plugin_registrar`]: plugin-registrar.md +`rustc_private` feature. ------------------------ @@ -39,7 +37,6 @@ additional checks for code style, safety, etc. Now let's write a plugin that warns about any item named `lintme`. ```rust,ignore (requires-stage-2) -#![feature(plugin_registrar)] #![feature(box_syntax, rustc_private)] extern crate rustc_ast; @@ -68,8 +65,8 @@ impl EarlyLintPass for Pass { } } -#[plugin_registrar] -pub fn plugin_registrar(reg: &mut Registry) { +#[no_mangle] +fn __rustc_plugin_registrar(reg: &mut Registry) { reg.lint_store.register_lints(&[&TEST_LINT]); reg.lint_store.register_early_pass(|| box Pass); } diff --git a/src/test/ui-fulldeps/auxiliary/empty-plugin.rs b/src/test/ui-fulldeps/auxiliary/empty-plugin.rs index 66fc245bdf5..c24cdc97aa5 100644 --- a/src/test/ui-fulldeps/auxiliary/empty-plugin.rs +++ b/src/test/ui-fulldeps/auxiliary/empty-plugin.rs @@ -1,10 +1,9 @@ // force-host -#![feature(plugin_registrar)] #![feature(rustc_private)] extern crate rustc_driver; use rustc_driver::plugin::Registry; -#[plugin_registrar] -pub fn plugin_registrar(_: &mut Registry) {} +#[no_mangle] +fn __rustc_plugin_registrar(_: &mut Registry) {} diff --git a/src/test/ui-fulldeps/auxiliary/issue-40001-plugin.rs b/src/test/ui-fulldeps/auxiliary/issue-40001-plugin.rs index 124dd670d09..0b68d5e04f7 100644 --- a/src/test/ui-fulldeps/auxiliary/issue-40001-plugin.rs +++ b/src/test/ui-fulldeps/auxiliary/issue-40001-plugin.rs @@ -1,10 +1,9 @@ -#![feature(box_syntax, plugin, plugin_registrar, rustc_private)] +#![feature(box_syntax, plugin, rustc_private)] #![crate_type = "dylib"] extern crate rustc_ast_pretty; extern crate rustc_driver; extern crate rustc_hir; -#[macro_use] extern crate rustc_lint; #[macro_use] extern crate rustc_session; @@ -16,11 +15,11 @@ use rustc_driver::plugin::Registry; use rustc_hir as hir; use rustc_hir::intravisit; use rustc_hir::Node; -use rustc_lint::{LateContext, LateLintPass, LintArray, LintContext, LintPass}; +use rustc_lint::{LateContext, LateLintPass, LintContext}; use rustc_span::source_map; -#[plugin_registrar] -pub fn plugin_registrar(reg: &mut Registry) { +#[no_mangle] +fn __rustc_plugin_registrar(reg: &mut Registry) { reg.lint_store.register_lints(&[&MISSING_ALLOWED_ATTR]); reg.lint_store.register_late_pass(|| box MissingAllowedAttrPass); } diff --git a/src/test/ui-fulldeps/auxiliary/lint-for-crate-rpass.rs b/src/test/ui-fulldeps/auxiliary/lint-for-crate-rpass.rs index 1f494e44484..0015a826126 100644 --- a/src/test/ui-fulldeps/auxiliary/lint-for-crate-rpass.rs +++ b/src/test/ui-fulldeps/auxiliary/lint-for-crate-rpass.rs @@ -1,6 +1,6 @@ // force-host -#![feature(plugin_registrar, rustc_private)] +#![feature(rustc_private)] #![feature(box_syntax)] extern crate rustc_driver; @@ -64,8 +64,8 @@ fake_lint_pass! { Symbol::intern("crate_grey"), Symbol::intern("crate_green") } -#[plugin_registrar] -pub fn plugin_registrar(reg: &mut Registry) { +#[no_mangle] +fn __rustc_plugin_registrar(reg: &mut Registry) { reg.lint_store.register_lints(&[ &CRATE_NOT_OKAY, &CRATE_NOT_RED, diff --git a/src/test/ui-fulldeps/auxiliary/lint-for-crate.rs b/src/test/ui-fulldeps/auxiliary/lint-for-crate.rs index 122a544e9d4..87c90b53648 100644 --- a/src/test/ui-fulldeps/auxiliary/lint-for-crate.rs +++ b/src/test/ui-fulldeps/auxiliary/lint-for-crate.rs @@ -1,6 +1,6 @@ // force-host -#![feature(plugin_registrar, rustc_private)] +#![feature(rustc_private)] #![feature(box_syntax)] extern crate rustc_driver; @@ -38,8 +38,8 @@ impl<'tcx> LateLintPass<'tcx> for Pass { } } -#[plugin_registrar] -pub fn plugin_registrar(reg: &mut Registry) { +#[no_mangle] +fn __rustc_plugin_registrar(reg: &mut Registry) { reg.lint_store.register_lints(&[&CRATE_NOT_OKAY]); reg.lint_store.register_late_pass(|| box Pass); } diff --git a/src/test/ui-fulldeps/auxiliary/lint-group-plugin-test.rs b/src/test/ui-fulldeps/auxiliary/lint-group-plugin-test.rs index 02216b33dc3..f6ae560411b 100644 --- a/src/test/ui-fulldeps/auxiliary/lint-group-plugin-test.rs +++ b/src/test/ui-fulldeps/auxiliary/lint-group-plugin-test.rs @@ -1,6 +1,5 @@ // force-host -#![feature(plugin_registrar)] #![feature(box_syntax, rustc_private)] // Load rustc as a plugin to get macros. @@ -34,8 +33,8 @@ impl<'tcx> LateLintPass<'tcx> for Pass { } } -#[plugin_registrar] -pub fn plugin_registrar(reg: &mut Registry) { +#[no_mangle] +fn __rustc_plugin_registrar(reg: &mut Registry) { reg.lint_store.register_lints(&[&TEST_LINT, &PLEASE_LINT]); reg.lint_store.register_late_pass(|| box Pass); reg.lint_store.register_group( diff --git a/src/test/ui-fulldeps/auxiliary/lint-plugin-test.rs b/src/test/ui-fulldeps/auxiliary/lint-plugin-test.rs index 8cf8b7a4493..32326bc8a5e 100644 --- a/src/test/ui-fulldeps/auxiliary/lint-plugin-test.rs +++ b/src/test/ui-fulldeps/auxiliary/lint-plugin-test.rs @@ -1,6 +1,5 @@ // force-host -#![feature(plugin_registrar)] #![feature(box_syntax, rustc_private)] extern crate rustc_ast; @@ -29,8 +28,8 @@ impl EarlyLintPass for Pass { } } -#[plugin_registrar] -pub fn plugin_registrar(reg: &mut Registry) { +#[no_mangle] +fn __rustc_plugin_registrar(reg: &mut Registry) { reg.lint_store.register_lints(&[&TEST_LINT]); reg.lint_store.register_early_pass(|| box Pass); } diff --git a/src/test/ui-fulldeps/auxiliary/lint-tool-test.rs b/src/test/ui-fulldeps/auxiliary/lint-tool-test.rs index 08b8fb3cbae..42c1c851de8 100644 --- a/src/test/ui-fulldeps/auxiliary/lint-tool-test.rs +++ b/src/test/ui-fulldeps/auxiliary/lint-tool-test.rs @@ -1,4 +1,3 @@ -#![feature(plugin_registrar)] #![feature(box_syntax, rustc_private)] extern crate rustc_ast; @@ -44,8 +43,8 @@ impl EarlyLintPass for Pass { } } -#[plugin_registrar] -pub fn plugin_registrar(reg: &mut Registry) { +#[no_mangle] +fn __rustc_plugin_registrar(reg: &mut Registry) { reg.lint_store.register_lints(&[&TEST_RUSTC_TOOL_LINT, &TEST_LINT, &TEST_GROUP]); reg.lint_store.register_early_pass(|| box Pass); reg.lint_store.register_group( diff --git a/src/test/ui-fulldeps/auxiliary/lto-syntax-extension-plugin.rs b/src/test/ui-fulldeps/auxiliary/lto-syntax-extension-plugin.rs index 5fbb3efabb3..9b075c1a5b9 100644 --- a/src/test/ui-fulldeps/auxiliary/lto-syntax-extension-plugin.rs +++ b/src/test/ui-fulldeps/auxiliary/lto-syntax-extension-plugin.rs @@ -1,6 +1,5 @@ // force-host -#![feature(plugin_registrar)] #![feature(rustc_private)] extern crate rustc_middle; @@ -8,5 +7,5 @@ extern crate rustc_driver; use rustc_driver::plugin::Registry; -#[plugin_registrar] -pub fn plugin_registrar(_reg: &mut Registry) {} +#[no_mangle] +fn __rustc_plugin_registrar(_reg: &mut Registry) {} diff --git a/src/test/ui-fulldeps/auxiliary/multiple-plugins-1.rs b/src/test/ui-fulldeps/auxiliary/multiple-plugins-1.rs new file mode 100644 index 00000000000..fd6e9e20f03 --- /dev/null +++ b/src/test/ui-fulldeps/auxiliary/multiple-plugins-1.rs @@ -0,0 +1,10 @@ +#![crate_type = "dylib"] +#![feature(rustc_private)] + +extern crate rustc_middle; +extern crate rustc_driver; + +use rustc_driver::plugin::Registry; + +#[no_mangle] +fn __rustc_plugin_registrar(_: &mut Registry) {} diff --git a/src/test/ui-fulldeps/auxiliary/multiple-plugins-2.rs b/src/test/ui-fulldeps/auxiliary/multiple-plugins-2.rs new file mode 100644 index 00000000000..fd6e9e20f03 --- /dev/null +++ b/src/test/ui-fulldeps/auxiliary/multiple-plugins-2.rs @@ -0,0 +1,10 @@ +#![crate_type = "dylib"] +#![feature(rustc_private)] + +extern crate rustc_middle; +extern crate rustc_driver; + +use rustc_driver::plugin::Registry; + +#[no_mangle] +fn __rustc_plugin_registrar(_: &mut Registry) {} diff --git a/src/test/ui-fulldeps/auxiliary/outlive-expansion-phase.rs b/src/test/ui-fulldeps/auxiliary/outlive-expansion-phase.rs index 6584b905f5e..d0eedf23caf 100644 --- a/src/test/ui-fulldeps/auxiliary/outlive-expansion-phase.rs +++ b/src/test/ui-fulldeps/auxiliary/outlive-expansion-phase.rs @@ -1,6 +1,5 @@ // force-host -#![feature(plugin_registrar)] #![feature(box_syntax, rustc_private)] extern crate rustc_middle; @@ -18,8 +17,8 @@ impl Drop for Foo { fn drop(&mut self) {} } -#[plugin_registrar] -pub fn registrar(_: &mut Registry) { +#[no_mangle] +fn __rustc_plugin_registrar(_: &mut Registry) { thread_local!(static FOO: RefCell>> = RefCell::new(None)); FOO.with(|s| *s.borrow_mut() = Some(box Foo { foo: 10 } as Box)); } diff --git a/src/test/ui-fulldeps/auxiliary/rlib-crate-test.rs b/src/test/ui-fulldeps/auxiliary/rlib-crate-test.rs index e8e8ae2985a..3ba73538ecf 100644 --- a/src/test/ui-fulldeps/auxiliary/rlib-crate-test.rs +++ b/src/test/ui-fulldeps/auxiliary/rlib-crate-test.rs @@ -1,12 +1,12 @@ // no-prefer-dynamic #![crate_type = "rlib"] -#![feature(plugin_registrar, rustc_private)] +#![feature(rustc_private)] extern crate rustc_middle; extern crate rustc_driver; use rustc_driver::plugin::Registry; -#[plugin_registrar] -pub fn plugin_registrar(_: &mut Registry) {} +#[no_mangle] +fn __rustc_plugin_registrar(_: &mut Registry) {} diff --git a/src/test/ui-fulldeps/multiple-plugins.rs b/src/test/ui-fulldeps/multiple-plugins.rs new file mode 100644 index 00000000000..25d2c8bc123 --- /dev/null +++ b/src/test/ui-fulldeps/multiple-plugins.rs @@ -0,0 +1,11 @@ +// run-pass +// aux-build:multiple-plugins-1.rs +// aux-build:multiple-plugins-2.rs + +// Check that the plugin registrar of multiple plugins doesn't conflict + +#![feature(plugin)] +#![plugin(multiple_plugins_1)] //~ WARN use of deprecated attribute `plugin` +#![plugin(multiple_plugins_2)] //~ WARN use of deprecated attribute `plugin` + +fn main() {} diff --git a/src/test/ui-fulldeps/multiple-plugins.stderr b/src/test/ui-fulldeps/multiple-plugins.stderr new file mode 100644 index 00000000000..99151933c4b --- /dev/null +++ b/src/test/ui-fulldeps/multiple-plugins.stderr @@ -0,0 +1,16 @@ +warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675 + --> $DIR/multiple-plugins.rs:8:1 + | +LL | #![plugin(multiple_plugins_1)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version + | + = note: `#[warn(deprecated)]` on by default + +warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675 + --> $DIR/multiple-plugins.rs:9:1 + | +LL | #![plugin(multiple_plugins_2)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version + +warning: 2 warnings emitted + diff --git a/src/test/ui/feature-gates/feature-gate-plugin_registrar.rs b/src/test/ui/feature-gates/feature-gate-plugin_registrar.rs deleted file mode 100644 index 80e4aa76b47..00000000000 --- a/src/test/ui/feature-gates/feature-gate-plugin_registrar.rs +++ /dev/null @@ -1,11 +0,0 @@ -// Test that `#[plugin_registrar]` attribute is gated by `plugin_registrar` -// feature gate. - -// the registration function isn't typechecked yet -#[plugin_registrar] -//~^ ERROR compiler plugins are deprecated -//~| WARN use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated -pub fn registrar() {} -//~^ ERROR compiler plugins are experimental and possibly buggy - -fn main() {} diff --git a/src/test/ui/feature-gates/feature-gate-plugin_registrar.stderr b/src/test/ui/feature-gates/feature-gate-plugin_registrar.stderr deleted file mode 100644 index b3a43f4eef2..00000000000 --- a/src/test/ui/feature-gates/feature-gate-plugin_registrar.stderr +++ /dev/null @@ -1,29 +0,0 @@ -error[E0658]: compiler plugins are experimental and possibly buggy - --> $DIR/feature-gate-plugin_registrar.rs:8:1 - | -LL | pub fn registrar() {} - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #29597 for more information - = help: add `#![feature(plugin_registrar)]` to the crate attributes to enable - -error[E0658]: compiler plugins are deprecated - --> $DIR/feature-gate-plugin_registrar.rs:5:1 - | -LL | #[plugin_registrar] - | ^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #29597 for more information - = help: add `#![feature(plugin_registrar)]` to the crate attributes to enable - -warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675 - --> $DIR/feature-gate-plugin_registrar.rs:5:1 - | -LL | #[plugin_registrar] - | ^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version - | - = note: `#[warn(deprecated)]` on by default - -error: aborting due to 2 previous errors; 1 warning emitted - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs b/src/test/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs index 19a60f1bcff..1e5f3d17a90 100644 --- a/src/test/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs +++ b/src/test/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs @@ -35,18 +35,11 @@ // check-pass -#![feature(test, plugin_registrar)] +#![feature(test)] #![warn(unused_attributes, unknown_lints)] //~^ NOTE the lint level is defined here //~| NOTE the lint level is defined here -// Exception, a gated and deprecated attribute. - -#![plugin_registrar] -//~^ WARN unused attribute -//~| WARN use of deprecated attribute -//~| HELP may be removed in a future compiler version - // UNGATED WHITE-LISTED BUILT-IN ATTRIBUTES #![warn(x5400)] //~ WARN unknown lint: `x5400` @@ -90,6 +83,7 @@ #![crate_id = "10"] //~^ WARN use of deprecated attribute //~| HELP remove this attribute +//~| NOTE `#[warn(deprecated)]` on by default // FIXME(#44232) we should warn that this isn't used. #![feature(rust1)] @@ -219,35 +213,6 @@ mod macro_export { //~^ WARN unused attribute } -#[plugin_registrar] -//~^ WARN unused attribute -//~| WARN use of deprecated attribute -//~| HELP may be removed in a future compiler version -mod plugin_registrar { - mod inner { #![plugin_registrar] } - //~^ WARN unused attribute - //~| WARN use of deprecated attribute - //~| HELP may be removed in a future compiler version - //~| NOTE `#[warn(deprecated)]` on by default - - // for `fn f()` case, see gated-plugin_registrar.rs - - #[plugin_registrar] struct S; - //~^ WARN unused attribute - //~| WARN use of deprecated attribute - //~| HELP may be removed in a future compiler version - - #[plugin_registrar] type T = S; - //~^ WARN unused attribute - //~| WARN use of deprecated attribute - //~| HELP may be removed in a future compiler version - - #[plugin_registrar] impl S { } - //~^ WARN unused attribute - //~| WARN use of deprecated attribute - //~| HELP may be removed in a future compiler version -} - // At time of unit test authorship, if compiling without `--test` then // non-crate-level #[test] attributes seem to be ignored. diff --git a/src/test/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr b/src/test/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr index c207c05455f..6f5d7304467 100644 --- a/src/test/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr +++ b/src/test/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr @@ -1,5 +1,5 @@ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:52:9 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:45:9 | LL | #![warn(x5400)] | ^^^^^ @@ -11,169 +11,169 @@ LL | #![warn(unused_attributes, unknown_lints)] | ^^^^^^^^^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:53:10 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:46:10 | LL | #![allow(x5300)] | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:54:11 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:47:11 | LL | #![forbid(x5200)] | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:55:9 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:48:9 | LL | #![deny(x5100)] | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:110:8 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:104:8 | LL | #[warn(x5400)] | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:113:25 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:107:25 | LL | mod inner { #![warn(x5400)] } | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:116:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:110:12 | LL | #[warn(x5400)] fn f() { } | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:119:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:113:12 | LL | #[warn(x5400)] struct S; | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:122:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:116:12 | LL | #[warn(x5400)] type T = S; | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:125:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:119:12 | LL | #[warn(x5400)] impl S { } | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:129:9 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:123:9 | LL | #[allow(x5300)] | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:132:26 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:126:26 | LL | mod inner { #![allow(x5300)] } | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:135:13 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:129:13 | LL | #[allow(x5300)] fn f() { } | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:138:13 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:132:13 | LL | #[allow(x5300)] struct S; | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:141:13 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:135:13 | LL | #[allow(x5300)] type T = S; | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:144:13 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:138:13 | LL | #[allow(x5300)] impl S { } | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:148:10 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:142:10 | LL | #[forbid(x5200)] | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:151:27 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:145:27 | LL | mod inner { #![forbid(x5200)] } | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:154:14 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:148:14 | LL | #[forbid(x5200)] fn f() { } | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:157:14 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:151:14 | LL | #[forbid(x5200)] struct S; | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:160:14 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:154:14 | LL | #[forbid(x5200)] type T = S; | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:163:14 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:157:14 | LL | #[forbid(x5200)] impl S { } | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:167:8 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:161:8 | LL | #[deny(x5100)] | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:170:25 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:164:25 | LL | mod inner { #![deny(x5100)] } | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:173:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:167:12 | LL | #[deny(x5100)] fn f() { } | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:176:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:170:12 | LL | #[deny(x5100)] struct S; | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:179:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:173:12 | LL | #[deny(x5100)] type T = S; | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:182:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:176:12 | LL | #[deny(x5100)] impl S { } | ^^^^^ warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:440:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:405:17 | LL | mod inner { #![macro_escape] } | ^^^^^^^^^^^^^^^^ @@ -181,63 +181,27 @@ LL | mod inner { #![macro_escape] } = help: try an outer attribute: `#[macro_use]` warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:437:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:402:1 | LL | #[macro_escape] | ^^^^^^^^^^^^^^^ -warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675 - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:227:17 - | -LL | mod inner { #![plugin_registrar] } - | ^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version - | - = note: `#[warn(deprecated)]` on by default - -warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675 - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:235:5 - | -LL | #[plugin_registrar] struct S; - | ^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version - -warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675 - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:240:5 - | -LL | #[plugin_registrar] type T = S; - | ^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version - -warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675 - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:245:5 - | -LL | #[plugin_registrar] impl S { } - | ^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version - -warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675 - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:222:1 - | -LL | #[plugin_registrar] - | ^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version - -warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675 - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:45:1 - | -LL | #![plugin_registrar] - | ^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version - warning: use of deprecated attribute `crate_id`: no longer used. - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:90:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:83:1 | LL | #![crate_id = "10"] | ^^^^^^^^^^^^^^^^^^^ help: remove this attribute + | + = note: `#[warn(deprecated)]` on by default warning: use of deprecated attribute `no_start`: no longer used. - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:99:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:93:1 | LL | #![no_start] | ^^^^^^^^^^^^ help: remove this attribute warning: attribute should be applied to a function or static - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:332:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:297:1 | LL | #[no_mangle] | ^^^^^^^^^^^^ @@ -259,7 +223,7 @@ LL | #![warn(unused_attributes, unknown_lints)] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a function - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:499:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:464:1 | LL | #[cold] | ^^^^^^^ @@ -276,7 +240,7 @@ LL | | } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a foreign function or static - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:528:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:493:1 | LL | #[link_name = "1900"] | ^^^^^^^^^^^^^^^^^^^^^ @@ -293,7 +257,7 @@ LL | | } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a function or static - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:567:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:532:1 | LL | #[link_section = "1800"] | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -310,7 +274,7 @@ LL | | } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a function - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:68:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:61:1 | LL | #![cold] | ^^^^^^^^ @@ -318,7 +282,7 @@ LL | #![cold] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a foreign function or static - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:72:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:65:1 | LL | #![link_name = "1900"] | ^^^^^^^^^^^^^^^^^^^^^^ @@ -326,7 +290,7 @@ LL | #![link_name = "1900"] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a function or static - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:75:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:68:1 | LL | #![link_section = "1800"] | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -334,7 +298,7 @@ LL | #![link_section = "1800"] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a function or static - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:337:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:302:17 | LL | mod inner { #![no_mangle] } | ------------^^^^^^^^^^^^^-- not a function or static @@ -342,7 +306,7 @@ LL | mod inner { #![no_mangle] } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a function or static - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:344:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:309:5 | LL | #[no_mangle] struct S; | ^^^^^^^^^^^^ --------- not a function or static @@ -350,7 +314,7 @@ LL | #[no_mangle] struct S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a function or static - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:349:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:314:5 | LL | #[no_mangle] type T = S; | ^^^^^^^^^^^^ ----------- not a function or static @@ -358,7 +322,7 @@ LL | #[no_mangle] type T = S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a function or static - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:354:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:319:5 | LL | #[no_mangle] impl S { } | ^^^^^^^^^^^^ ---------- not a function or static @@ -366,7 +330,7 @@ LL | #[no_mangle] impl S { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a function - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:505:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:470:17 | LL | mod inner { #![cold] } | ------------^^^^^^^^-- not a function @@ -374,7 +338,7 @@ LL | mod inner { #![cold] } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a function - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:512:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:477:5 | LL | #[cold] struct S; | ^^^^^^^ --------- not a function @@ -382,7 +346,7 @@ LL | #[cold] struct S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a function - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:517:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:482:5 | LL | #[cold] type T = S; | ^^^^^^^ ----------- not a function @@ -390,7 +354,7 @@ LL | #[cold] type T = S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a function - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:522:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:487:5 | LL | #[cold] impl S { } | ^^^^^^^ ---------- not a function @@ -398,7 +362,7 @@ LL | #[cold] impl S { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a foreign function or static - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:534:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:499:5 | LL | #[link_name = "1900"] | ^^^^^^^^^^^^^^^^^^^^^ @@ -408,13 +372,13 @@ LL | extern "C" { } | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! help: try `#[link(name = "1900")]` instead - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:534:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:499:5 | LL | #[link_name = "1900"] | ^^^^^^^^^^^^^^^^^^^^^ warning: attribute should be applied to a foreign function or static - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:541:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:506:17 | LL | mod inner { #![link_name="1900"] } | ------------^^^^^^^^^^^^^^^^^^^^-- not a foreign function or static @@ -422,7 +386,7 @@ LL | mod inner { #![link_name="1900"] } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a foreign function or static - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:546:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:511:5 | LL | #[link_name = "1900"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^ ---------- not a foreign function or static @@ -430,7 +394,7 @@ LL | #[link_name = "1900"] fn f() { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a foreign function or static - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:551:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:516:5 | LL | #[link_name = "1900"] struct S; | ^^^^^^^^^^^^^^^^^^^^^ --------- not a foreign function or static @@ -438,7 +402,7 @@ LL | #[link_name = "1900"] struct S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a foreign function or static - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:556:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:521:5 | LL | #[link_name = "1900"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^ ----------- not a foreign function or static @@ -446,7 +410,7 @@ LL | #[link_name = "1900"] type T = S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a foreign function or static - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:561:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:526:5 | LL | #[link_name = "1900"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^ ---------- not a foreign function or static @@ -454,7 +418,7 @@ LL | #[link_name = "1900"] impl S { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a function or static - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:573:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:538:17 | LL | mod inner { #![link_section="1800"] } | ------------^^^^^^^^^^^^^^^^^^^^^^^-- not a function or static @@ -462,7 +426,7 @@ LL | mod inner { #![link_section="1800"] } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a function or static - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:580:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:545:5 | LL | #[link_section = "1800"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^ --------- not a function or static @@ -470,7 +434,7 @@ LL | #[link_section = "1800"] struct S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a function or static - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:585:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:550:5 | LL | #[link_section = "1800"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^ ----------- not a function or static @@ -478,7 +442,7 @@ LL | #[link_section = "1800"] type T = S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a function or static - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:590:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:555:5 | LL | #[link_section = "1800"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^ ---------- not a function or static @@ -486,7 +450,7 @@ LL | #[link_section = "1800"] impl S { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: the feature `rust1` has been stable since 1.0.0 and no longer requires an attribute to enable - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:95:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:89:12 | LL | #![feature(rust1)] | ^^^^^ @@ -494,850 +458,814 @@ LL | #![feature(rust1)] = note: `#[warn(stable_features)]` on by default warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:45:1 - | -LL | #![plugin_registrar] - | ^^^^^^^^^^^^^^^^^^^^ - -warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:59:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:52:1 | LL | #![should_panic] | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:60:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:53:1 | LL | #![ignore] | ^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:66:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:59:1 | LL | #![proc_macro_derive()] | ^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:190:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:184:5 | LL | #[macro_use] fn f() { } | ^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:193:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:187:5 | LL | #[macro_use] struct S; | ^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:196:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:190:5 | LL | #[macro_use] type T = S; | ^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:199:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:193:5 | LL | #[macro_use] impl S { } | ^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:203:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:197:1 | LL | #[macro_export] | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:206:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:200:17 | LL | mod inner { #![macro_export] } | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:209:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:203:5 | LL | #[macro_export] fn f() { } | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:212:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:206:5 | LL | #[macro_export] struct S; | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:215:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:209:5 | LL | #[macro_export] type T = S; | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:218:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:212:5 | LL | #[macro_export] impl S { } | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:222:1 - | -LL | #[plugin_registrar] - | ^^^^^^^^^^^^^^^^^^^ - -warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:227:17 - | -LL | mod inner { #![plugin_registrar] } - | ^^^^^^^^^^^^^^^^^^^^ - -warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:235:5 - | -LL | #[plugin_registrar] struct S; - | ^^^^^^^^^^^^^^^^^^^ - -warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:240:5 - | -LL | #[plugin_registrar] type T = S; - | ^^^^^^^^^^^^^^^^^^^ - -warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:245:5 - | -LL | #[plugin_registrar] impl S { } - | ^^^^^^^^^^^^^^^^^^^ - -warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:300:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:265:5 | LL | #[path = "3800"] fn f() { } | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:303:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:268:5 | LL | #[path = "3800"] struct S; | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:306:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:271:5 | LL | #[path = "3800"] type T = S; | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:309:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:274:5 | LL | #[path = "3800"] impl S { } | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:313:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:278:1 | LL | #[automatically_derived] | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:316:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:281:17 | LL | mod inner { #![automatically_derived] } | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:319:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:284:5 | LL | #[automatically_derived] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:322:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:287:5 | LL | #[automatically_derived] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:325:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:290:5 | LL | #[automatically_derived] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:328:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:293:5 | LL | #[automatically_derived] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:360:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:325:1 | LL | #[should_panic] | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:363:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:328:17 | LL | mod inner { #![should_panic] } | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:366:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:331:5 | LL | #[should_panic] fn f() { } | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:369:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:334:5 | LL | #[should_panic] struct S; | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:372:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:337:5 | LL | #[should_panic] type T = S; | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:375:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:340:5 | LL | #[should_panic] impl S { } | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:379:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:344:1 | LL | #[ignore] | ^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:382:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:347:17 | LL | mod inner { #![ignore] } | ^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:385:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:350:5 | LL | #[ignore] fn f() { } | ^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:388:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:353:5 | LL | #[ignore] struct S; | ^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:391:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:356:5 | LL | #[ignore] type T = S; | ^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:394:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:359:5 | LL | #[ignore] impl S { } | ^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:398:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:363:1 | LL | #[no_implicit_prelude] | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:401:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:366:17 | LL | mod inner { #![no_implicit_prelude] } | ^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:404:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:369:5 | LL | #[no_implicit_prelude] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:407:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:372:5 | LL | #[no_implicit_prelude] struct S; | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:410:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:375:5 | LL | #[no_implicit_prelude] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:413:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:378:5 | LL | #[no_implicit_prelude] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:417:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:382:1 | LL | #[reexport_test_harness_main = "2900"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:420:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:385:17 | LL | mod inner { #![reexport_test_harness_main="2900"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:423:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:388:5 | LL | #[reexport_test_harness_main = "2900"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:426:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:391:5 | LL | #[reexport_test_harness_main = "2900"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:429:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:394:5 | LL | #[reexport_test_harness_main = "2900"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:432:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:397:5 | LL | #[reexport_test_harness_main = "2900"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:444:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:409:5 | LL | #[macro_escape] fn f() { } | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:447:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:412:5 | LL | #[macro_escape] struct S; | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:450:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:415:5 | LL | #[macro_escape] type T = S; | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:453:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:418:5 | LL | #[macro_escape] impl S { } | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:457:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:422:1 | LL | #[no_std] | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:457:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:422:1 | LL | #[no_std] | ^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:461:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:426:17 | LL | mod inner { #![no_std] } | ^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:461:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:426:17 | LL | mod inner { #![no_std] } | ^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:465:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:430:5 | LL | #[no_std] fn f() { } | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:465:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:430:5 | LL | #[no_std] fn f() { } | ^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:469:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:434:5 | LL | #[no_std] struct S; | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:469:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:434:5 | LL | #[no_std] struct S; | ^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:473:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:438:5 | LL | #[no_std] type T = S; | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:473:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:438:5 | LL | #[no_std] type T = S; | ^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:477:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:442:5 | LL | #[no_std] impl S { } | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:477:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:442:5 | LL | #[no_std] impl S { } | ^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:658:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:623:1 | LL | #[crate_name = "0900"] | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:658:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:623:1 | LL | #[crate_name = "0900"] | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:662:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:627:17 | LL | mod inner { #![crate_name="0900"] } | ^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:662:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:627:17 | LL | mod inner { #![crate_name="0900"] } | ^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:666:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:631:5 | LL | #[crate_name = "0900"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:666:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:631:5 | LL | #[crate_name = "0900"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:670:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:635:5 | LL | #[crate_name = "0900"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:670:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:635:5 | LL | #[crate_name = "0900"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:674:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:639:5 | LL | #[crate_name = "0900"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:674:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:639:5 | LL | #[crate_name = "0900"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:678:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:643:5 | LL | #[crate_name = "0900"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:678:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:643:5 | LL | #[crate_name = "0900"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:683:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:648:1 | LL | #[crate_type = "0800"] | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:683:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:648:1 | LL | #[crate_type = "0800"] | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:687:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:652:17 | LL | mod inner { #![crate_type="0800"] } | ^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:687:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:652:17 | LL | mod inner { #![crate_type="0800"] } | ^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:691:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:656:5 | LL | #[crate_type = "0800"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:691:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:656:5 | LL | #[crate_type = "0800"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:695:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:660:5 | LL | #[crate_type = "0800"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:695:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:660:5 | LL | #[crate_type = "0800"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:699:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:664:5 | LL | #[crate_type = "0800"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:699:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:664:5 | LL | #[crate_type = "0800"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:703:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:668:5 | LL | #[crate_type = "0800"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:703:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:668:5 | LL | #[crate_type = "0800"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:708:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:673:1 | LL | #[feature(x0600)] | ^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:708:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:673:1 | LL | #[feature(x0600)] | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:712:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:677:17 | LL | mod inner { #![feature(x0600)] } | ^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:712:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:677:17 | LL | mod inner { #![feature(x0600)] } | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:716:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:681:5 | LL | #[feature(x0600)] fn f() { } | ^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:716:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:681:5 | LL | #[feature(x0600)] fn f() { } | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:720:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:685:5 | LL | #[feature(x0600)] struct S; | ^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:720:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:685:5 | LL | #[feature(x0600)] struct S; | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:724:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:689:5 | LL | #[feature(x0600)] type T = S; | ^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:724:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:689:5 | LL | #[feature(x0600)] type T = S; | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:728:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:693:5 | LL | #[feature(x0600)] impl S { } | ^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:728:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:693:5 | LL | #[feature(x0600)] impl S { } | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:734:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:699:1 | LL | #[no_main] | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:734:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:699:1 | LL | #[no_main] | ^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:738:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:703:17 | LL | mod inner { #![no_main] } | ^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:738:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:703:17 | LL | mod inner { #![no_main] } | ^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:742:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:707:5 | LL | #[no_main] fn f() { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:742:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:707:5 | LL | #[no_main] fn f() { } | ^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:746:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:711:5 | LL | #[no_main] struct S; | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:746:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:711:5 | LL | #[no_main] struct S; | ^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:750:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:715:5 | LL | #[no_main] type T = S; | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:750:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:715:5 | LL | #[no_main] type T = S; | ^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:754:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:719:5 | LL | #[no_main] impl S { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:754:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:719:5 | LL | #[no_main] impl S { } | ^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:772:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:737:1 | LL | #[recursion_limit="0200"] | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:772:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:737:1 | LL | #[recursion_limit="0200"] | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:776:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:741:17 | LL | mod inner { #![recursion_limit="0200"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:776:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:741:17 | LL | mod inner { #![recursion_limit="0200"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:780:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:745:5 | LL | #[recursion_limit="0200"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:780:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:745:5 | LL | #[recursion_limit="0200"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:784:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:749:5 | LL | #[recursion_limit="0200"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:784:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:749:5 | LL | #[recursion_limit="0200"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:788:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:753:5 | LL | #[recursion_limit="0200"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:788:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:753:5 | LL | #[recursion_limit="0200"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:792:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:757:5 | LL | #[recursion_limit="0200"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:792:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:757:5 | LL | #[recursion_limit="0200"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:797:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:762:1 | LL | #[type_length_limit="0100"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:797:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:762:1 | LL | #[type_length_limit="0100"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:801:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:766:17 | LL | mod inner { #![type_length_limit="0100"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:801:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:766:17 | LL | mod inner { #![type_length_limit="0100"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:805:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:770:5 | LL | #[type_length_limit="0100"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:805:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:770:5 | LL | #[type_length_limit="0100"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:809:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:774:5 | LL | #[type_length_limit="0100"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:809:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:774:5 | LL | #[type_length_limit="0100"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:813:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:778:5 | LL | #[type_length_limit="0100"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:813:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:778:5 | LL | #[type_length_limit="0100"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:817:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:782:5 | LL | #[type_length_limit="0100"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:817:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:782:5 | LL | #[type_length_limit="0100"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: 205 warnings emitted +warning: 193 warnings emitted diff --git a/src/test/ui/multiple-plugin-registrars.rs b/src/test/ui/multiple-plugin-registrars.rs deleted file mode 100644 index d211204b134..00000000000 --- a/src/test/ui/multiple-plugin-registrars.rs +++ /dev/null @@ -1,12 +0,0 @@ -// error-pattern: multiple plugin registration functions found - -#![feature(plugin_registrar)] - -// the registration function isn't typechecked yet -#[plugin_registrar] -pub fn one() {} - -#[plugin_registrar] -pub fn two() {} - -fn main() {} diff --git a/src/test/ui/multiple-plugin-registrars.stderr b/src/test/ui/multiple-plugin-registrars.stderr deleted file mode 100644 index 7b86d762e31..00000000000 --- a/src/test/ui/multiple-plugin-registrars.stderr +++ /dev/null @@ -1,29 +0,0 @@ -warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675 - --> $DIR/multiple-plugin-registrars.rs:6:1 - | -LL | #[plugin_registrar] - | ^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version - | - = note: `#[warn(deprecated)]` on by default - -warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675 - --> $DIR/multiple-plugin-registrars.rs:9:1 - | -LL | #[plugin_registrar] - | ^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version - -error: multiple plugin registration functions found - | -note: one is here - --> $DIR/multiple-plugin-registrars.rs:10:1 - | -LL | pub fn two() {} - | ^^^^^^^^^^^^^^^ -note: one is here - --> $DIR/multiple-plugin-registrars.rs:7:1 - | -LL | pub fn one() {} - | ^^^^^^^^^^^^^^^ - -error: aborting due to previous error; 2 warnings emitted -