diff --git a/compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs b/compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs index ffd48612d0ec3..20e8407fcc669 100644 --- a/compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs +++ b/compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs @@ -422,14 +422,20 @@ impl NoArgsAttributeParser for NoMangleParser { note: "the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them", unsafe_since: Some(Edition2024), }; - const ALLOWED_TARGETS: AllowedTargets<'_> = AllowedTargets::AllowListWarnRest(&[ + const ALLOWED_TARGETS: AllowedTargets<'_> = AllowedTargets::AllowList(&[ Allow(Target::Fn), Allow(Target::Static), Allow(Target::Method(MethodKind::Inherent)), Allow(Target::Method(MethodKind::TraitImpl)), AllowSilent(Target::Const), // Handled in the `InvalidNoMangleItems` pass - Error(Target::Closure), - Error(Target::Param), + // Removing these warnings has shown to cause breakage in crater run on https://github.com/rust-lang/rust/pull/164789 + Warn(Target::ForeignStatic), + Warn(Target::ForeignFn), + Warn(Target::ForeignMod), + Warn(Target::Struct), + Warn(Target::Enum), + Warn(Target::Use), + Warn(Target::TyAlias), ]); const STABILITY: AttributeStability = AttributeStability::Stable; const CREATE: fn(Span) -> AttributeKind = AttributeKind::NoMangle; diff --git a/tests/ui/attributes/attr-on-mac-call.rs b/tests/ui/attributes/attr-on-mac-call.rs index da57853f4bddd..c86bbf56e1268 100644 --- a/tests/ui/attributes/attr-on-mac-call.rs +++ b/tests/ui/attributes/attr-on-mac-call.rs @@ -58,8 +58,7 @@ fn main() { //~| WARN previously accepted unreachable!(); #[no_mangle] - //~^ WARN attribute cannot be used on macro calls - //~| WARN previously accepted + //~^ ERROR attribute cannot be used on macro calls unreachable!(); #[deprecated] //~^ WARN attribute cannot be used on macro calls diff --git a/tests/ui/attributes/attr-on-mac-call.stderr b/tests/ui/attributes/attr-on-mac-call.stderr index d51f3ef574688..996723630ff7f 100644 --- a/tests/ui/attributes/attr-on-mac-call.stderr +++ b/tests/ui/attributes/attr-on-mac-call.stderr @@ -1,5 +1,16 @@ +error: the `no_mangle` attribute cannot be used on macro calls + --> $DIR/attr-on-mac-call.rs:60:7 + | +LL | #[no_mangle] + | ^^^^^^^^^ +LL | +LL | unreachable!(); + | + = help: the `no_mangle` attribute can be applied to functions and statics + = note: attributes on a macro invocation apply to the invocation itself and are not forwarded to its expansion + error: the `sanitize` attribute cannot be used on macro calls - --> $DIR/attr-on-mac-call.rs:100:7 + --> $DIR/attr-on-mac-call.rs:99:7 | LL | #[sanitize(address = "off")] | ^^^^^^^^ @@ -10,7 +21,7 @@ LL | unreachable!(); = note: attributes on a macro invocation apply to the invocation itself and are not forwarded to its expansion error[E0658]: SIMD types are experimental and possibly buggy - --> $DIR/attr-on-mac-call.rs:129:12 + --> $DIR/attr-on-mac-call.rs:128:12 | LL | #[repr(simd)] | ^^^^ @@ -20,7 +31,7 @@ LL | #[repr(simd)] = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: the `repr(simd)` attribute cannot be used on macro calls - --> $DIR/attr-on-mac-call.rs:129:7 + --> $DIR/attr-on-mac-call.rs:128:7 | LL | #[repr(simd)] | ^^^^^^^^^^ @@ -31,31 +42,31 @@ LL | unreachable!(); = note: attributes on a macro invocation apply to the invocation itself and are not forwarded to its expansion error: crate-level attribute should be an inner attribute: add an exclamation mark: `#![register_tool]` - --> $DIR/attr-on-mac-call.rs:133:5 + --> $DIR/attr-on-mac-call.rs:132:5 | LL | #[register_tool(xyz)] | ^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this macro call - --> $DIR/attr-on-mac-call.rs:135:5 + --> $DIR/attr-on-mac-call.rs:134:5 | LL | unreachable!(); | ^^^^^^^^^^^^^^ error: attribute value must be a literal - --> $DIR/attr-on-mac-call.rs:136:20 + --> $DIR/attr-on-mac-call.rs:135:20 | LL | #[deprecated = concat!("woah", "dude")] | ^^^^^^^^^^^^^^^^^^^^^^^ error: attribute value must be a literal - --> $DIR/attr-on-mac-call.rs:138:13 + --> $DIR/attr-on-mac-call.rs:137:13 | LL | #[doc = concat!("woah", "dude")] | ^^^^^^^^^^^^^^^^^^^^^^^ error: attribute value must be a literal - --> $DIR/attr-on-mac-call.rs:141:13 + --> $DIR/attr-on-mac-call.rs:140:13 | LL | #[doc = { | _____________^ @@ -67,7 +78,7 @@ LL | | }] | |_____^ error: attribute value must be a literal - --> $DIR/attr-on-mac-call.rs:149:13 + --> $DIR/attr-on-mac-call.rs:148:13 | LL | #[doc = { | _____________^ @@ -236,20 +247,8 @@ LL | unreachable!(); = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: attributes on a macro invocation apply to the invocation itself and are not forwarded to its expansion -warning: the `no_mangle` attribute cannot be used on macro calls - --> $DIR/attr-on-mac-call.rs:60:7 - | -LL | #[no_mangle] - | ^^^^^^^^^ -... -LL | unreachable!(); - | - = help: the `no_mangle` attribute can be applied to functions and statics - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: attributes on a macro invocation apply to the invocation itself and are not forwarded to its expansion - warning: the `deprecated` attribute cannot be used on macro calls - --> $DIR/attr-on-mac-call.rs:64:7 + --> $DIR/attr-on-mac-call.rs:63:7 | LL | #[deprecated] | ^^^^^^^^^^ @@ -261,7 +260,7 @@ LL | unreachable!(); = note: attributes on a macro invocation apply to the invocation itself and are not forwarded to its expansion warning: the `automatically_derived` attribute cannot be used on macro calls - --> $DIR/attr-on-mac-call.rs:68:7 + --> $DIR/attr-on-mac-call.rs:67:7 | LL | #[automatically_derived] | ^^^^^^^^^^^^^^^^^^^^^ @@ -273,7 +272,7 @@ LL | unreachable!(); = note: attributes on a macro invocation apply to the invocation itself and are not forwarded to its expansion warning: the `macro_use` attribute cannot be used on macro calls - --> $DIR/attr-on-mac-call.rs:72:7 + --> $DIR/attr-on-mac-call.rs:71:7 | LL | #[macro_use] | ^^^^^^^^^ @@ -285,7 +284,7 @@ LL | unreachable!(); = note: attributes on a macro invocation apply to the invocation itself and are not forwarded to its expansion warning: the `must_use` attribute cannot be used on macro calls - --> $DIR/attr-on-mac-call.rs:76:7 + --> $DIR/attr-on-mac-call.rs:75:7 | LL | #[must_use] | ^^^^^^^^ @@ -297,7 +296,7 @@ LL | unreachable!(); = note: attributes on a macro invocation apply to the invocation itself and are not forwarded to its expansion warning: the `no_implicit_prelude` attribute cannot be used on macro calls - --> $DIR/attr-on-mac-call.rs:80:7 + --> $DIR/attr-on-mac-call.rs:79:7 | LL | #[no_implicit_prelude] | ^^^^^^^^^^^^^^^^^^^ @@ -309,7 +308,7 @@ LL | unreachable!(); = note: attributes on a macro invocation apply to the invocation itself and are not forwarded to its expansion warning: the `path` attribute cannot be used on macro calls - --> $DIR/attr-on-mac-call.rs:84:7 + --> $DIR/attr-on-mac-call.rs:83:7 | LL | #[path = ""] | ^^^^ @@ -321,7 +320,7 @@ LL | unreachable!(); = note: attributes on a macro invocation apply to the invocation itself and are not forwarded to its expansion warning: the `ignore` attribute cannot be used on macro calls - --> $DIR/attr-on-mac-call.rs:88:7 + --> $DIR/attr-on-mac-call.rs:87:7 | LL | #[ignore] | ^^^^^^ @@ -333,7 +332,7 @@ LL | unreachable!(); = note: attributes on a macro invocation apply to the invocation itself and are not forwarded to its expansion warning: the `should_panic` attribute cannot be used on macro calls - --> $DIR/attr-on-mac-call.rs:92:7 + --> $DIR/attr-on-mac-call.rs:91:7 | LL | #[should_panic] | ^^^^^^^^^^^^ @@ -345,7 +344,7 @@ LL | unreachable!(); = note: attributes on a macro invocation apply to the invocation itself and are not forwarded to its expansion warning: the `link_name` attribute cannot be used on macro calls - --> $DIR/attr-on-mac-call.rs:96:7 + --> $DIR/attr-on-mac-call.rs:95:7 | LL | #[link_name = "x"] | ^^^^^^^^^ @@ -357,7 +356,7 @@ LL | unreachable!(); = note: attributes on a macro invocation apply to the invocation itself and are not forwarded to its expansion warning: the `repr()` attribute cannot be used on macro calls - --> $DIR/attr-on-mac-call.rs:104:7 + --> $DIR/attr-on-mac-call.rs:103:7 | LL | #[repr()] | ^^^^^^ @@ -369,7 +368,7 @@ LL | unreachable!(); = note: attributes on a macro invocation apply to the invocation itself and are not forwarded to its expansion warning: unused attribute - --> $DIR/attr-on-mac-call.rs:104:5 + --> $DIR/attr-on-mac-call.rs:103:5 | LL | #[repr()] | ^^^^^^^^^ help: remove this attribute @@ -377,7 +376,7 @@ LL | #[repr()] = note: using `repr` with an empty list has no effect warning: the `repr(u8)` attribute cannot be used on macro calls - --> $DIR/attr-on-mac-call.rs:109:7 + --> $DIR/attr-on-mac-call.rs:108:7 | LL | #[repr(u8)] | ^^^^^^^^ @@ -389,7 +388,7 @@ LL | unreachable!(); = note: attributes on a macro invocation apply to the invocation itself and are not forwarded to its expansion warning: the `repr(align(...))` attribute cannot be used on macro calls - --> $DIR/attr-on-mac-call.rs:113:7 + --> $DIR/attr-on-mac-call.rs:112:7 | LL | #[repr(align(8))] | ^^^^^^^^^^^^^^ @@ -401,7 +400,7 @@ LL | unreachable!(); = note: attributes on a macro invocation apply to the invocation itself and are not forwarded to its expansion warning: the `repr(packed)` attribute cannot be used on macro calls - --> $DIR/attr-on-mac-call.rs:117:7 + --> $DIR/attr-on-mac-call.rs:116:7 | LL | #[repr(packed)] | ^^^^^^^^^^^^ @@ -413,7 +412,7 @@ LL | unreachable!(); = note: attributes on a macro invocation apply to the invocation itself and are not forwarded to its expansion warning: the `repr(C)` attribute cannot be used on macro calls - --> $DIR/attr-on-mac-call.rs:121:7 + --> $DIR/attr-on-mac-call.rs:120:7 | LL | #[repr(C)] | ^^^^^^^ @@ -425,7 +424,7 @@ LL | unreachable!(); = note: attributes on a macro invocation apply to the invocation itself and are not forwarded to its expansion warning: the `repr(Rust)` attribute cannot be used on macro calls - --> $DIR/attr-on-mac-call.rs:125:7 + --> $DIR/attr-on-mac-call.rs:124:7 | LL | #[repr(Rust)] | ^^^^^^^^^^ @@ -436,6 +435,6 @@ LL | unreachable!(); = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: attributes on a macro invocation apply to the invocation itself and are not forwarded to its expansion -error: aborting due to 8 previous errors; 30 warnings emitted +error: aborting due to 9 previous errors; 29 warnings emitted For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/extern/extern-no-mangle.rs b/tests/ui/extern/extern-no-mangle.rs index 6f2d125b92306..5e0802cfbdb85 100644 --- a/tests/ui/extern/extern-no-mangle.rs +++ b/tests/ui/extern/extern-no-mangle.rs @@ -5,7 +5,7 @@ // The previous warning only talks about a "function or static" but foreign fns/statics // are also not allowed to have #[no_mangle] -//@ build-pass +//@ check-fail extern "C" { #[no_mangle] @@ -22,8 +22,7 @@ extern "C" { fn no_new_warn() { // Should emit the generic "not a function or static" warning #[no_mangle] - //~^ WARNING attribute cannot be used on - //~| WARN previously accepted + //~^ ERROR attribute cannot be used on let x = 0_u8; } diff --git a/tests/ui/extern/extern-no-mangle.stderr b/tests/ui/extern/extern-no-mangle.stderr index d01fb78095879..c607644d1f21f 100644 --- a/tests/ui/extern/extern-no-mangle.stderr +++ b/tests/ui/extern/extern-no-mangle.stderr @@ -1,18 +1,12 @@ -warning: the `no_mangle` attribute cannot be used on statements +error: the `no_mangle` attribute cannot be used on statements --> $DIR/extern-no-mangle.rs:24:7 | LL | #[no_mangle] | ^^^^^^^^^ -... +LL | LL | let x = 0_u8; | = help: the `no_mangle` attribute can be applied to functions and statics - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! -note: the lint level is defined here - --> $DIR/extern-no-mangle.rs:1:9 - | -LL | #![warn(unused_attributes)] - | ^^^^^^^^^^^^^^^^^ warning: the `no_mangle` attribute cannot be used on foreign statics --> $DIR/extern-no-mangle.rs:11:7 @@ -24,6 +18,11 @@ LL | pub static FOO: u8; | = help: the `no_mangle` attribute can be applied to functions and statics = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! +note: the lint level is defined here + --> $DIR/extern-no-mangle.rs:1:9 + | +LL | #![warn(unused_attributes)] + | ^^^^^^^^^^^^^^^^^ warning: the `no_mangle` attribute cannot be used on foreign functions --> $DIR/extern-no-mangle.rs:16:7 @@ -36,5 +35,5 @@ LL | pub fn bar(); = help: the `no_mangle` attribute can be applied to functions with a body and statics = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! -warning: 3 warnings emitted +error: aborting due to 1 previous error; 2 warnings emitted diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.rs b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.rs index 3c8c3c28e1b6e..807cd4fe0382a 100644 --- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.rs +++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.rs @@ -25,8 +25,7 @@ //~^ WARN may not be used in combination with `#[export_name]` //~| NOTE is ignored //~| NOTE requested on the command line -//~| WARN cannot be used on crates -//~| WARN previously accepted +//~| ERROR cannot be used on crates #![no_link] //~^ ERROR: the `no_link` attribute cannot be used on crates //~| ERROR use of deprecated `no_link` attribute @@ -186,4 +185,23 @@ mod repr_rust { //~^ ERROR: attribute cannot be used on } +#[no_mangle] +//~^ ERROR attribute cannot be used on +mod no_mangle { + mod inner { #![no_mangle] } + //~^ ERROR attribute cannot be used on + + struct S; + #[no_mangle] impl S { } + //~^ ERROR attribute cannot be used on + + trait Tr { + #[no_mangle] fn foo(); + //~^ ERROR attribute cannot be used on + + #[no_mangle] fn bar() {} + //~^ ERROR attribute cannot be used on + } +} + fn main() {} diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr index ec0a8a9d1a418..416f9d565977c 100644 --- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr +++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr @@ -48,8 +48,16 @@ LL | #![automatically_derived] | = help: the `automatically_derived` attribute can only be applied to trait impl blocks +error: the `no_mangle` attribute cannot be used on crates + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:24:4 + | +LL | #![no_mangle] + | ^^^^^^^^^ + | + = help: the `no_mangle` attribute can be applied to functions and statics + error: the `no_link` attribute cannot be used on crates - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:30:4 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:29:4 | LL | #![no_link] | ^^^^^^^ @@ -57,7 +65,7 @@ LL | #![no_link] = help: the `no_link` attribute can only be applied to extern crates error: the `export_name` attribute cannot be used on crates - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:36:4 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:35:4 | LL | #![export_name = "2200"] | ^^^^^^^^^^^ @@ -65,7 +73,7 @@ LL | #![export_name = "2200"] = help: the `export_name` attribute can be applied to functions and statics error: the `inline` attribute cannot be used on crates - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:39:4 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:38:4 | LL | #![inline] | ^^^^^^ @@ -73,7 +81,7 @@ LL | #![inline] = help: the `inline` attribute can only be applied to functions error: the `inline` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:41:3 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:40:3 | LL | #[inline] | ^^^^^^ @@ -83,7 +91,7 @@ LL | mod inline { = help: the `inline` attribute can only be applied to functions error: the `inline` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:44:20 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:43:20 | LL | mod inner { #![inline] } | ^^^^^^ @@ -91,7 +99,7 @@ LL | mod inner { #![inline] } = help: the `inline` attribute can only be applied to functions error: the `inline` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:53:7 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:52:7 | LL | #[inline] struct S; | ^^^^^^ @@ -99,7 +107,7 @@ LL | #[inline] struct S; = help: the `inline` attribute can only be applied to functions error: the `inline` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:56:7 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:55:7 | LL | #[inline] type T = S; | ^^^^^^ @@ -107,7 +115,7 @@ LL | #[inline] type T = S; = help: the `inline` attribute can only be applied to functions error: the `inline` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:59:7 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:58:7 | LL | #[inline] impl S { } | ^^^^^^ @@ -115,7 +123,7 @@ LL | #[inline] impl S { } = help: the `inline` attribute can only be applied to functions error: the `no_link` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:63:3 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:62:3 | LL | #[no_link] | ^^^^^^^ @@ -125,7 +133,7 @@ LL | mod no_link { = help: the `no_link` attribute can only be applied to extern crates error: the `no_link` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:69:20 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:68:20 | LL | mod inner { #![no_link] } | ^^^^^^^ @@ -133,7 +141,7 @@ LL | mod inner { #![no_link] } = help: the `no_link` attribute can only be applied to extern crates error: the `no_link` attribute cannot be used on functions - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:75:7 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:74:7 | LL | #[no_link] fn f() { | ^^^^^^^ @@ -141,7 +149,7 @@ LL | #[no_link] fn f() { = help: the `no_link` attribute can only be applied to extern crates error: the `no_link` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:91:7 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:90:7 | LL | #[no_link] | ^^^^^^^ @@ -151,7 +159,7 @@ LL | struct S { = help: the `no_link` attribute can only be applied to extern crates error: the `no_link` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:106:7 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:105:7 | LL | #[no_link]type T = S; | ^^^^^^^ @@ -159,7 +167,7 @@ LL | #[no_link]type T = S; = help: the `no_link` attribute can only be applied to extern crates error: the `no_link` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:112:7 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:111:7 | LL | #[no_link] impl S { } | ^^^^^^^ @@ -167,7 +175,7 @@ LL | #[no_link] impl S { } = help: the `no_link` attribute can only be applied to extern crates error: the `export_name` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:127:3 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:126:3 | LL | #[export_name = "2200"] | ^^^^^^^^^^^ @@ -177,7 +185,7 @@ LL | mod export_name { = help: the `export_name` attribute can be applied to functions and statics error: the `export_name` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:130:20 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:129:20 | LL | mod inner { #![export_name="2200"] } | ^^^^^^^^^^^ @@ -185,7 +193,7 @@ LL | mod inner { #![export_name="2200"] } = help: the `export_name` attribute can be applied to functions and statics error: the `export_name` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:135:7 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:134:7 | LL | #[export_name = "2200"] struct S; | ^^^^^^^^^^^ @@ -193,7 +201,7 @@ LL | #[export_name = "2200"] struct S; = help: the `export_name` attribute can be applied to functions and statics error: the `export_name` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:138:7 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:137:7 | LL | #[export_name = "2200"] type T = S; | ^^^^^^^^^^^ @@ -201,7 +209,7 @@ LL | #[export_name = "2200"] type T = S; = help: the `export_name` attribute can be applied to functions and statics error: the `export_name` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:141:7 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:140:7 | LL | #[export_name = "2200"] impl S { } | ^^^^^^^^^^^ @@ -209,7 +217,7 @@ LL | #[export_name = "2200"] impl S { } = help: the `export_name` attribute can be applied to functions and statics error: the `export_name` attribute cannot be used on required trait methods - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:145:11 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:144:11 | LL | #[export_name = "2200"] fn foo(); | ^^^^^^^^^^^ @@ -217,7 +225,7 @@ LL | #[export_name = "2200"] fn foo(); = help: the `export_name` attribute can be applied to functions with a body and statics error: the `repr(C)` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:152:3 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:151:3 | LL | #[repr(C)] | ^^^^^^^ @@ -227,7 +235,7 @@ LL | mod repr { = help: the `repr(C)` attribute can only be applied to data types error: the `repr(C)` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:155:20 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:154:20 | LL | mod inner { #![repr(C)] } | ^^^^^^^ @@ -235,7 +243,7 @@ LL | mod inner { #![repr(C)] } = help: the `repr(C)` attribute can only be applied to data types error: the `repr(C)` attribute cannot be used on functions - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:158:7 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:157:7 | LL | #[repr(C)] fn f() { } | ^^^^^^^ @@ -243,7 +251,7 @@ LL | #[repr(C)] fn f() { } = help: the `repr(C)` attribute can only be applied to data types error: the `repr(C)` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:163:7 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:162:7 | LL | #[repr(C)] type T = S; | ^^^^^^^ @@ -251,7 +259,7 @@ LL | #[repr(C)] type T = S; = help: the `repr(C)` attribute can only be applied to data types error: the `repr(C)` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:166:7 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:165:7 | LL | #[repr(C)] impl S { } | ^^^^^^^ @@ -259,7 +267,7 @@ LL | #[repr(C)] impl S { } = help: the `repr(C)` attribute can only be applied to data types error: the `repr(Rust)` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:171:3 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:170:3 | LL | #[repr(Rust)] | ^^^^^^^^^^ @@ -269,7 +277,7 @@ LL | mod repr_rust { = help: the `repr(Rust)` attribute can only be applied to data types error: the `repr(Rust)` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:174:20 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:173:20 | LL | mod inner { #![repr(Rust)] } | ^^^^^^^^^^ @@ -277,7 +285,7 @@ LL | mod inner { #![repr(Rust)] } = help: the `repr(Rust)` attribute can only be applied to data types error: the `repr(Rust)` attribute cannot be used on functions - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:177:7 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:176:7 | LL | #[repr(Rust)] fn f() { } | ^^^^^^^^^^ @@ -285,7 +293,7 @@ LL | #[repr(Rust)] fn f() { } = help: the `repr(Rust)` attribute can only be applied to data types error: the `repr(Rust)` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:182:7 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:181:7 | LL | #[repr(Rust)] type T = S; | ^^^^^^^^^^ @@ -293,13 +301,55 @@ LL | #[repr(Rust)] type T = S; = help: the `repr(Rust)` attribute can only be applied to data types error: the `repr(Rust)` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:185:7 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:184:7 | LL | #[repr(Rust)] impl S { } | ^^^^^^^^^^ | = help: the `repr(Rust)` attribute can only be applied to data types +error: the `no_mangle` attribute cannot be used on modules + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:188:3 + | +LL | #[no_mangle] + | ^^^^^^^^^ +LL | +LL | mod no_mangle { + | + = help: the `no_mangle` attribute can be applied to functions and statics + +error: the `no_mangle` attribute cannot be used on modules + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:191:20 + | +LL | mod inner { #![no_mangle] } + | ^^^^^^^^^ + | + = help: the `no_mangle` attribute can be applied to functions and statics + +error: the `no_mangle` attribute cannot be used on inherent impl blocks + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:195:7 + | +LL | #[no_mangle] impl S { } + | ^^^^^^^^^ + | + = help: the `no_mangle` attribute can be applied to functions and statics + +error: the `no_mangle` attribute cannot be used on required trait methods + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:199:11 + | +LL | #[no_mangle] fn foo(); + | ^^^^^^^^^ + | + = help: the `no_mangle` attribute can be applied to functions with a body and statics + +error: the `no_mangle` attribute cannot be used on provided trait methods + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:202:11 + | +LL | #[no_mangle] fn bar() {} + | ^^^^^^^^^ + | + = help: the `no_mangle` attribute can be applied to functions, inherent methods, statics, and trait methods in impl blocks + warning: `#[no_mangle]` attribute may not be used in combination with `#[export_name]` --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:24:1 | @@ -307,7 +357,7 @@ LL | #![no_mangle] | ^^^^^^^^^^^^^ `#[no_mangle]` is ignored | note: `#[export_name]` takes precedence - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:36:1 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:35:1 | LL | #![export_name = "2200"] | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -325,17 +375,8 @@ LL | #![repr()] | = note: using `repr` with an empty list has no effect -warning: the `no_mangle` attribute cannot be used on crates - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:24:4 - | -LL | #![no_mangle] - | ^^^^^^^^^ - | - = help: the `no_mangle` attribute can be applied to functions and statics - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - error: use of deprecated `no_link` attribute - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:30:1 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:29:1 | LL | #![no_link] | ^^^^^^^^^^^ @@ -345,7 +386,7 @@ LL | #![no_link] = note: `#[deny(no_link_attributes)]` (part of `#[deny(future_incompatible)]`) on by default error: valid forms for the attribute are `inline`, `inline(always)`, and `inline(never)` - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:47:7 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:46:7 | LL | #[inline = "2100"] fn f() { } | ^^^^^^^^^^^^^^^ @@ -355,7 +396,7 @@ LL | #[inline = "2100"] fn f() { } = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default error: use of deprecated `no_link` attribute - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:63:1 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:62:1 | LL | #[no_link] | ^^^^^^^^^^ @@ -364,7 +405,7 @@ LL | #[no_link] = note: for more information, see issue #164032 error: use of deprecated `no_link` attribute - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:69:17 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:68:17 | LL | mod inner { #![no_link] } | ^^^^^^^^^^^ @@ -373,7 +414,7 @@ LL | mod inner { #![no_link] } = note: for more information, see issue #164032 error: use of deprecated `no_link` attribute - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:75:5 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:74:5 | LL | #[no_link] fn f() { | ^^^^^^^^^^ @@ -382,7 +423,7 @@ LL | #[no_link] fn f() { = note: for more information, see issue #164032 warning: the `no_link` attribute cannot be used on match arms - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:81:15 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:80:15 | LL | #[no_link] | ^^^^^^^ @@ -393,7 +434,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! error: use of deprecated `no_link` attribute - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:81:13 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:80:13 | LL | #[no_link] | ^^^^^^^^^^ @@ -402,7 +443,7 @@ LL | #[no_link] = note: for more information, see issue #164032 error: use of deprecated `no_link` attribute - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:91:5 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:90:5 | LL | #[no_link] | ^^^^^^^^^^ @@ -411,7 +452,7 @@ LL | #[no_link] = note: for more information, see issue #164032 warning: the `no_link` attribute cannot be used on struct fields - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:97:11 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:96:11 | LL | #[no_link] | ^^^^^^^ @@ -422,7 +463,7 @@ LL | field: () = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! error: use of deprecated `no_link` attribute - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:97:9 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:96:9 | LL | #[no_link] | ^^^^^^^^^^ @@ -431,7 +472,7 @@ LL | #[no_link] = note: for more information, see issue #164032 error: use of deprecated `no_link` attribute - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:106:5 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:105:5 | LL | #[no_link]type T = S; | ^^^^^^^^^^ @@ -440,7 +481,7 @@ LL | #[no_link]type T = S; = note: for more information, see issue #164032 error: use of deprecated `no_link` attribute - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:112:5 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:111:5 | LL | #[no_link] impl S { } | ^^^^^^^^^^ @@ -449,7 +490,7 @@ LL | #[no_link] impl S { } = note: for more information, see issue #164032 warning: the `no_link` attribute cannot be used on macro defs - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:118:7 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:117:7 | LL | #[no_link] | ^^^^^^^ @@ -460,7 +501,7 @@ LL | macro_rules! m{() => {}} = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! error: use of deprecated `no_link` attribute - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:118:5 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:117:5 | LL | #[no_link] | ^^^^^^^^^^ @@ -468,12 +509,12 @@ LL | #[no_link] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #164032 -error: aborting due to 47 previous errors; 6 warnings emitted +error: aborting due to 53 previous errors; 5 warnings emitted For more information about this error, try `rustc --explain E0658`. Future incompatibility report: Future breakage diagnostic: error: use of deprecated `no_link` attribute - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:30:1 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:29:1 | LL | #![no_link] | ^^^^^^^^^^^ @@ -484,7 +525,7 @@ LL | #![no_link] Future breakage diagnostic: error: valid forms for the attribute are `inline`, `inline(always)`, and `inline(never)` - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:47:7 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:46:7 | LL | #[inline = "2100"] fn f() { } | ^^^^^^^^^^^^^^^ @@ -495,7 +536,7 @@ LL | #[inline = "2100"] fn f() { } Future breakage diagnostic: error: use of deprecated `no_link` attribute - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:63:1 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:62:1 | LL | #[no_link] | ^^^^^^^^^^ @@ -506,7 +547,7 @@ LL | #[no_link] Future breakage diagnostic: error: use of deprecated `no_link` attribute - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:69:17 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:68:17 | LL | mod inner { #![no_link] } | ^^^^^^^^^^^ @@ -517,7 +558,7 @@ LL | mod inner { #![no_link] } Future breakage diagnostic: error: use of deprecated `no_link` attribute - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:75:5 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:74:5 | LL | #[no_link] fn f() { | ^^^^^^^^^^ @@ -528,7 +569,7 @@ LL | #[no_link] fn f() { Future breakage diagnostic: error: use of deprecated `no_link` attribute - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:81:13 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:80:13 | LL | #[no_link] | ^^^^^^^^^^ @@ -539,7 +580,7 @@ LL | #[no_link] Future breakage diagnostic: error: use of deprecated `no_link` attribute - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:91:5 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:90:5 | LL | #[no_link] | ^^^^^^^^^^ @@ -550,7 +591,7 @@ LL | #[no_link] Future breakage diagnostic: error: use of deprecated `no_link` attribute - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:97:9 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:96:9 | LL | #[no_link] | ^^^^^^^^^^ @@ -561,7 +602,7 @@ LL | #[no_link] Future breakage diagnostic: error: use of deprecated `no_link` attribute - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:106:5 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:105:5 | LL | #[no_link]type T = S; | ^^^^^^^^^^ @@ -572,7 +613,7 @@ LL | #[no_link]type T = S; Future breakage diagnostic: error: use of deprecated `no_link` attribute - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:112:5 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:111:5 | LL | #[no_link] impl S { } | ^^^^^^^^^^ @@ -583,7 +624,7 @@ LL | #[no_link] impl S { } Future breakage diagnostic: error: use of deprecated `no_link` attribute - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:118:5 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:117:5 | LL | #[no_link] | ^^^^^^^^^^ diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs index adbf64e8b0f63..7a6fcc974e015 100644 --- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs +++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs @@ -330,18 +330,7 @@ mod automatically_derived { #[automatically_derived] impl W for S { } } -#[no_mangle] -//~^ WARN attribute cannot be used on -//~| WARN previously accepted -//~| HELP can be applied to -//~| HELP remove the attribute mod no_mangle { - mod inner { #![no_mangle] } - //~^ WARN attribute cannot be used on -//~| WARN previously accepted - //~| HELP can be applied to - //~| HELP remove the attribute - #[no_mangle] fn f() { } #[no_mangle] struct S; @@ -355,26 +344,6 @@ mod no_mangle { //~| WARN previously accepted //~| HELP can be applied to //~| HELP remove the attribute - - #[no_mangle] impl S { } - //~^ WARN attribute cannot be used on -//~| WARN previously accepted - //~| HELP can be applied to - //~| HELP remove the attribute - - trait Tr { - #[no_mangle] fn foo(); - //~^ WARN attribute cannot be used on -//~| WARN previously accepted - //~| HELP can be applied to - //~| HELP remove the attribute - - #[no_mangle] fn bar() {} - //~^ WARN attribute cannot be used on -//~| WARN previously accepted - //~| HELP can be applied to - //~| HELP remove the attribute - } } #[should_panic] diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr index f685a989c0aa6..91c88ad12cd53 100644 --- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr +++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr @@ -1,5 +1,5 @@ warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:479:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:448:17 | LL | mod inner { #![macro_escape] } | ^^^^^^^^^^^^^^^^ @@ -7,7 +7,7 @@ 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:476:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:445:1 | LL | #[macro_escape] | ^^^^^^^^^^^^^^^ @@ -481,28 +481,8 @@ LL | #[automatically_derived] impl S { } = help: the `automatically_derived` attribute can only be applied to trait impl blocks = 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 `no_mangle` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:333:3 - | -LL | #[no_mangle] - | ^^^^^^^^^ -... -LL | mod no_mangle { - | - = help: the `no_mangle` attribute can be applied to functions and statics - = 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 `no_mangle` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:339:20 - | -LL | mod inner { #![no_mangle] } - | ^^^^^^^^^ - | - = help: the `no_mangle` attribute can be applied to functions and statics - = 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 `no_mangle` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:347:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:336:7 | LL | #[no_mangle] struct S; | ^^^^^^^^^ @@ -511,7 +491,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: the `no_mangle` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:353:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:342:7 | LL | #[no_mangle] type T = S; | ^^^^^^^^^ @@ -519,17 +499,8 @@ LL | #[no_mangle] type T = S; = help: the `no_mangle` attribute can be applied to functions and statics = 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 `no_mangle` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:359:7 - | -LL | #[no_mangle] impl S { } - | ^^^^^^^^^ - | - = help: the `no_mangle` attribute can be applied to functions and statics - = 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 `should_panic` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:380:3 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:349:3 | LL | #[should_panic] | ^^^^^^^^^^^^ @@ -540,7 +511,7 @@ LL | mod should_panic { = 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 `should_panic` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:386:20 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:355:20 | LL | mod inner { #![should_panic] } | ^^^^^^^^^^^^ @@ -549,7 +520,7 @@ LL | mod inner { #![should_panic] } = 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 `should_panic` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:394:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:363:7 | LL | #[should_panic] struct S; | ^^^^^^^^^^^^ @@ -558,7 +529,7 @@ LL | #[should_panic] 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: the `should_panic` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:400:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:369:7 | LL | #[should_panic] type T = S; | ^^^^^^^^^^^^ @@ -567,7 +538,7 @@ LL | #[should_panic] 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: the `should_panic` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:406:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:375:7 | LL | #[should_panic] impl S { } | ^^^^^^^^^^^^ @@ -576,7 +547,7 @@ LL | #[should_panic] 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 `ignore` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:413:3 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:382:3 | LL | #[ignore] | ^^^^^^ @@ -587,7 +558,7 @@ LL | mod ignore { = 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 `ignore` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:419:20 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:388:20 | LL | mod inner { #![ignore] } | ^^^^^^ @@ -596,7 +567,7 @@ LL | mod inner { #![ignore] } = 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 `ignore` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:427:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:396:7 | LL | #[ignore] struct S; | ^^^^^^ @@ -605,7 +576,7 @@ LL | #[ignore] 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: the `ignore` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:433:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:402:7 | LL | #[ignore] type T = S; | ^^^^^^ @@ -614,7 +585,7 @@ LL | #[ignore] 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: the `ignore` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:439:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:408:7 | LL | #[ignore] impl S { } | ^^^^^^ @@ -623,7 +594,7 @@ LL | #[ignore] 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 `no_implicit_prelude` attribute cannot be used on functions - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:450:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:419:7 | LL | #[no_implicit_prelude] fn f() { } | ^^^^^^^^^^^^^^^^^^^ @@ -632,7 +603,7 @@ LL | #[no_implicit_prelude] 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: the `no_implicit_prelude` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:456:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:425:7 | LL | #[no_implicit_prelude] struct S; | ^^^^^^^^^^^^^^^^^^^ @@ -641,7 +612,7 @@ LL | #[no_implicit_prelude] 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: the `no_implicit_prelude` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:462:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:431:7 | LL | #[no_implicit_prelude] type T = S; | ^^^^^^^^^^^^^^^^^^^ @@ -650,7 +621,7 @@ LL | #[no_implicit_prelude] 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: the `no_implicit_prelude` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:468:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:437:7 | LL | #[no_implicit_prelude] impl S { } | ^^^^^^^^^^^^^^^^^^^ @@ -659,7 +630,7 @@ LL | #[no_implicit_prelude] 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 `macro_escape` attribute cannot be used on functions - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:483:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:452:7 | LL | #[macro_escape] fn f() { } | ^^^^^^^^^^^^ @@ -668,7 +639,7 @@ LL | #[macro_escape] 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: the `macro_escape` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:489:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:458:7 | LL | #[macro_escape] struct S; | ^^^^^^^^^^^^ @@ -677,7 +648,7 @@ LL | #[macro_escape] 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: the `macro_escape` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:495:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:464:7 | LL | #[macro_escape] type T = S; | ^^^^^^^^^^^^ @@ -686,7 +657,7 @@ LL | #[macro_escape] 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: the `macro_escape` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:501:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:470:7 | LL | #[macro_escape] impl S { } | ^^^^^^^^^^^^ @@ -695,13 +666,13 @@ LL | #[macro_escape] 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: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_std]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:508:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:477:1 | LL | #[no_std] | ^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:510:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:479:1 | LL | / mod no_std { LL | | @@ -711,61 +682,61 @@ LL | | } | |_^ warning: the `#![no_std]` attribute can only be used at the crate root - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:512:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:481:17 | LL | mod inner { #![no_std] } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_std]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:515:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:484:5 | LL | #[no_std] fn f() { } | ^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this function - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:515:15 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:484:15 | LL | #[no_std] fn f() { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_std]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:519:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:488:5 | LL | #[no_std] struct S; | ^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this struct - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:519:15 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:488:15 | LL | #[no_std] struct S; | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_std]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:523:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:492:5 | LL | #[no_std] type T = S; | ^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this type alias - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:523:15 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:492:15 | LL | #[no_std] type T = S; | ^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_std]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:527:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:496:5 | LL | #[no_std] impl S { } | ^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this implementation block - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:527:15 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:496:15 | LL | #[no_std] impl S { } | ^^^^^^^^^^ warning: the `cold` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:549:3 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:518:3 | LL | #[cold] | ^^^^ @@ -776,7 +747,7 @@ LL | mod 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: the `cold` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:556:20 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:525:20 | LL | mod inner { #![cold] } | ^^^^ @@ -785,7 +756,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: the `cold` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:564:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:533:7 | LL | #[cold] struct S; | ^^^^ @@ -794,7 +765,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: the `cold` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:570:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:539:7 | LL | #[cold] type T = S; | ^^^^ @@ -803,7 +774,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: the `cold` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:576:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:545:7 | LL | #[cold] impl S { } | ^^^^ @@ -812,7 +783,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: the `link_name` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:583:3 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:552:3 | LL | #[link_name = "1900"] | ^^^^^^^^^ @@ -823,7 +794,7 @@ LL | mod link_name { = 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 `link_name` attribute cannot be used on foreign modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:589:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:558:7 | LL | #[link_name = "1900"] | ^^^^^^^^^ @@ -834,7 +805,7 @@ 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! warning: the `link_name` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:596:20 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:565:20 | LL | mod inner { #![link_name="1900"] } | ^^^^^^^^^ @@ -843,7 +814,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: the `link_name` attribute cannot be used on functions - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:602:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:571:7 | LL | #[link_name = "1900"] fn f() { } | ^^^^^^^^^ @@ -852,7 +823,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: the `link_name` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:608:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:577:7 | LL | #[link_name = "1900"] struct S; | ^^^^^^^^^ @@ -861,7 +832,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: the `link_name` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:614:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:583:7 | LL | #[link_name = "1900"] type T = S; | ^^^^^^^^^ @@ -870,7 +841,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: the `link_name` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:620:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:589:7 | LL | #[link_name = "1900"] impl S { } | ^^^^^^^^^ @@ -879,7 +850,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: the `link_section` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:627:3 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:596:3 | LL | #[link_section = ",1800"] | ^^^^^^^^^^^^ @@ -890,7 +861,7 @@ LL | mod link_section { = 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 `link_section` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:633:20 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:602:20 | LL | mod inner { #![link_section=",1800"] } | ^^^^^^^^^^^^ @@ -899,7 +870,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: the `link_section` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:641:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:610:7 | LL | #[link_section = ",1800"] struct S; | ^^^^^^^^^^^^ @@ -908,7 +879,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: the `link_section` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:647:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:616:7 | LL | #[link_section = ",1800"] type T = S; | ^^^^^^^^^^^^ @@ -917,7 +888,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: the `link_section` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:653:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:622:7 | LL | #[link_section = ",1800"] impl S { } | ^^^^^^^^^^^^ @@ -926,7 +897,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 `link_section` attribute cannot be used on traits - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:659:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:628:7 | LL | #[link_section = ",1800"] | ^^^^^^^^^^^^ @@ -937,7 +908,7 @@ LL | trait Tr { = 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 `link` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:693:3 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:662:3 | LL | #[link(name = "x")] | ^^^^ @@ -948,7 +919,7 @@ LL | mod link { = 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 `link` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:699:20 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:668:20 | LL | mod inner { #![link(name = "x")] } | ^^^^ @@ -957,7 +928,7 @@ LL | mod inner { #![link(name = "x")] } = 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 `link` attribute cannot be used on functions - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:705:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:674:7 | LL | #[link(name = "x")] fn f() { } | ^^^^ @@ -966,7 +937,7 @@ LL | #[link(name = "x")] 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: the `link` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:711:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:680:7 | LL | #[link(name = "x")] struct S; | ^^^^ @@ -975,7 +946,7 @@ LL | #[link(name = "x")] 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: the `link` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:717:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:686:7 | LL | #[link(name = "x")] type T = S; | ^^^^ @@ -984,7 +955,7 @@ LL | #[link(name = "x")] 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: the `link` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:723:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:692:7 | LL | #[link(name = "x")] impl S { } | ^^^^ @@ -993,7 +964,7 @@ LL | #[link(name = "x")] 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 an `extern` block with non-Rust ABI - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:729:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:698:5 | LL | #[link(name = "x")] extern "Rust" {} | ^^^^^^^^^^^^^^^^^^^ @@ -1001,7 +972,7 @@ LL | #[link(name = "x")] extern "Rust" {} = 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 `must_use` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:749:3 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:718:3 | LL | #[must_use] | ^^^^^^^^ @@ -1012,7 +983,7 @@ LL | mod must_use { = 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 `must_use` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:754:20 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:723:20 | LL | mod inner { #![must_use] } | ^^^^^^^^ @@ -1021,7 +992,7 @@ LL | mod inner { #![must_use] } = 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 `must_use` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:763:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:732:7 | LL | #[must_use] type T = S; | ^^^^^^^^ @@ -1030,7 +1001,7 @@ LL | #[must_use] 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: the `must_use` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:768:7 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:737:7 | LL | #[must_use] impl S { } | ^^^^^^^^ @@ -1039,13 +1010,13 @@ LL | #[must_use] 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: crate-level attribute should be an inner attribute: add an exclamation mark: `#![windows_subsystem]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:774:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:743:1 | LL | #[windows_subsystem = "windows"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:776:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:745:1 | LL | / mod windows_subsystem { LL | | @@ -1055,67 +1026,67 @@ LL | | } | |_^ warning: the `#![windows_subsystem]` attribute can only be used at the crate root - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:778:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:747:17 | LL | mod inner { #![windows_subsystem="windows"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![windows_subsystem]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:781:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:750:5 | LL | #[windows_subsystem = "windows"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this function - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:781:38 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:750:38 | LL | #[windows_subsystem = "windows"] fn f() { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![windows_subsystem]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:785:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:754:5 | LL | #[windows_subsystem = "windows"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this struct - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:785:38 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:754:38 | LL | #[windows_subsystem = "windows"] struct S; | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![windows_subsystem]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:789:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:758:5 | LL | #[windows_subsystem = "windows"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this type alias - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:789:38 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:758:38 | LL | #[windows_subsystem = "windows"] type T = S; | ^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![windows_subsystem]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:793:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:762:5 | LL | #[windows_subsystem = "windows"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this implementation block - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:793:38 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:762:38 | LL | #[windows_subsystem = "windows"] impl S { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_name]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:800:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:769:1 | LL | #[crate_name = "0900"] | ^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:802:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:771:1 | LL | / mod crate_name { LL | | @@ -1125,67 +1096,67 @@ LL | | } | |_^ warning: the `#![crate_name]` attribute can only be used at the crate root - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:804:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:773:17 | LL | mod inner { #![crate_name="0900"] } | ^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_name]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:807:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:776:5 | LL | #[crate_name = "0900"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this function - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:807:28 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:776:28 | LL | #[crate_name = "0900"] fn f() { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_name]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:811:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:780:5 | LL | #[crate_name = "0900"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this struct - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:811:28 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:780:28 | LL | #[crate_name = "0900"] struct S; | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_name]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:815:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:784:5 | LL | #[crate_name = "0900"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this type alias - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:815:28 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:784:28 | LL | #[crate_name = "0900"] type T = S; | ^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_name]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:819:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:788:5 | LL | #[crate_name = "0900"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this implementation block - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:819:28 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:788:28 | LL | #[crate_name = "0900"] impl S { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_type]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:824:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:793:1 | LL | #[crate_type = "0800"] | ^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:826:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:795:1 | LL | / mod crate_type { LL | | @@ -1195,67 +1166,67 @@ LL | | } | |_^ warning: the `#![crate_type]` attribute can only be used at the crate root - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:828:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:797:17 | LL | mod inner { #![crate_type="0800"] } | ^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_type]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:831:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:800:5 | LL | #[crate_type = "0800"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this function - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:831:28 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:800:28 | LL | #[crate_type = "0800"] fn f() { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_type]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:835:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:804:5 | LL | #[crate_type = "0800"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this struct - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:835:28 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:804:28 | LL | #[crate_type = "0800"] struct S; | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_type]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:839:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:808:5 | LL | #[crate_type = "0800"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this type alias - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:839:28 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:808:28 | LL | #[crate_type = "0800"] type T = S; | ^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_type]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:843:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:812:5 | LL | #[crate_type = "0800"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this implementation block - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:843:28 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:812:28 | LL | #[crate_type = "0800"] impl S { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![feature]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:848:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:817:1 | LL | #[feature(x0600)] | ^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:850:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:819:1 | LL | / mod feature { LL | | @@ -1265,67 +1236,67 @@ LL | | } | |_^ warning: the `#![feature]` attribute can only be used at the crate root - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:852:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:821:17 | LL | mod inner { #![feature(x0600)] } | ^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![feature]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:855:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:824:5 | LL | #[feature(x0600)] fn f() { } | ^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this function - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:855:23 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:824:23 | LL | #[feature(x0600)] fn f() { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![feature]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:859:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:828:5 | LL | #[feature(x0600)] struct S; | ^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this struct - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:859:23 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:828:23 | LL | #[feature(x0600)] struct S; | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![feature]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:863:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:832:5 | LL | #[feature(x0600)] type T = S; | ^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this type alias - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:863:23 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:832:23 | LL | #[feature(x0600)] type T = S; | ^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![feature]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:867:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:836:5 | LL | #[feature(x0600)] impl S { } | ^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this implementation block - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:867:23 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:836:23 | LL | #[feature(x0600)] impl S { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_main]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:873:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:842:1 | LL | #[no_main] | ^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:875:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:844:1 | LL | / mod no_main_1 { LL | | @@ -1335,67 +1306,67 @@ LL | | } | |_^ warning: the `#![no_main]` attribute can only be used at the crate root - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:877:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:846:17 | LL | mod inner { #![no_main] } | ^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_main]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:880:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:849:5 | LL | #[no_main] fn f() { } | ^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this function - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:880:16 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:849:16 | LL | #[no_main] fn f() { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_main]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:884:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:853:5 | LL | #[no_main] struct S; | ^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this struct - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:884:16 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:853:16 | LL | #[no_main] struct S; | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_main]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:888:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:857:5 | LL | #[no_main] type T = S; | ^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this type alias - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:888:16 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:857:16 | LL | #[no_main] type T = S; | ^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_main]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:892:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:861:5 | LL | #[no_main] impl S { } | ^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this implementation block - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:892:16 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:861:16 | LL | #[no_main] impl S { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_builtins]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:897:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:866:1 | LL | #[no_builtins] | ^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:899:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:868:1 | LL | / mod no_builtins { LL | | @@ -1405,67 +1376,67 @@ LL | | } | |_^ warning: the `#![no_builtins]` attribute can only be used at the crate root - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:901:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:870:17 | LL | mod inner { #![no_builtins] } | ^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_builtins]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:904:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:873:5 | LL | #[no_builtins] fn f() { } | ^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this function - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:904:20 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:873:20 | LL | #[no_builtins] fn f() { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_builtins]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:908:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:877:5 | LL | #[no_builtins] struct S; | ^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this struct - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:908:20 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:877:20 | LL | #[no_builtins] struct S; | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_builtins]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:912:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:881:5 | LL | #[no_builtins] type T = S; | ^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this type alias - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:912:20 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:881:20 | LL | #[no_builtins] type T = S; | ^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_builtins]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:916:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:885:5 | LL | #[no_builtins] impl S { } | ^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this implementation block - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:916:20 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:885:20 | LL | #[no_builtins] impl S { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![recursion_limit]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:921:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:890:1 | LL | #[recursion_limit="0200"] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:923:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:892:1 | LL | / mod recursion_limit { LL | | @@ -1475,67 +1446,67 @@ LL | | } | |_^ warning: the `#![recursion_limit]` attribute can only be used at the crate root - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:925:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:894:17 | LL | mod inner { #![recursion_limit="0200"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![recursion_limit]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:928:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:897:5 | LL | #[recursion_limit="0200"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this function - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:928:31 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:897:31 | LL | #[recursion_limit="0200"] fn f() { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![recursion_limit]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:932:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:901:5 | LL | #[recursion_limit="0200"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this struct - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:932:31 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:901:31 | LL | #[recursion_limit="0200"] struct S; | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![recursion_limit]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:936:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:905:5 | LL | #[recursion_limit="0200"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this type alias - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:936:31 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:905:31 | LL | #[recursion_limit="0200"] type T = S; | ^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![recursion_limit]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:940:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:909:5 | LL | #[recursion_limit="0200"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this implementation block - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:940:31 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:909:31 | LL | #[recursion_limit="0200"] impl S { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![type_length_limit]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:945:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:914:1 | LL | #[type_length_limit="0100"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:947:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:916:1 | LL | / mod type_length_limit { LL | | @@ -1545,79 +1516,61 @@ LL | | } | |_^ warning: the `#![type_length_limit]` attribute can only be used at the crate root - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:949:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:918:17 | LL | mod inner { #![type_length_limit="0100"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![type_length_limit]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:952:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:921:5 | LL | #[type_length_limit="0100"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this function - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:952:33 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:921:33 | LL | #[type_length_limit="0100"] fn f() { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![type_length_limit]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:956:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:925:5 | LL | #[type_length_limit="0100"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this struct - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:956:33 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:925:33 | LL | #[type_length_limit="0100"] struct S; | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![type_length_limit]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:960:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:929:5 | LL | #[type_length_limit="0100"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this type alias - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:960:33 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:929:33 | LL | #[type_length_limit="0100"] type T = S; | ^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![type_length_limit]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:964:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:933:5 | LL | #[type_length_limit="0100"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this implementation block - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:964:33 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:933:33 | LL | #[type_length_limit="0100"] impl S { } | ^^^^^^^^^^ -warning: the `no_mangle` attribute cannot be used on required trait methods - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:366:11 - | -LL | #[no_mangle] fn foo(); - | ^^^^^^^^^ - | - = help: the `no_mangle` attribute can be applied to functions with a body and statics - = 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 `no_mangle` attribute cannot be used on provided trait methods - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:372:11 - | -LL | #[no_mangle] fn bar() {} - | ^^^^^^^^^ - | - = help: the `no_mangle` attribute can be applied to functions, inherent methods, statics, and trait methods in impl blocks - = 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 `link_section` attribute cannot be used on required trait methods - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:665:11 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:634:11 | LL | #[link_section = ",1800"] | ^^^^^^^^^^^^ @@ -1627,5 +1580,5 @@ LL | fn inside_tr_no_default(&self); = help: the `link_section` attribute can be applied to functions with a body and statics = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! -warning: 171 warnings emitted +warning: 166 warnings emitted