Add regression test for link_section targets

(cherry picked from commit 1589c6c12d)
This commit is contained in:
Jonathan Brouwer 2025-10-07 09:40:27 +02:00 committed by Josh Stone
parent 15843ffde1
commit 555abc18d7
2 changed files with 110 additions and 75 deletions

View file

@ -687,6 +687,32 @@ mod link_section {
//~| WARN previously accepted
//~| HELP can be applied to
//~| HELP remove the attribute
#[link_section = "1800"]
//~^ WARN attribute cannot be used on
//~| WARN previously accepted
//~| HELP can be applied to
//~| HELP remove the attribute
trait Tr {
#[link_section = "1800"]
fn inside_tr_no_default(&self);
#[link_section = "1800"]
fn inside_tr_default(&self) { }
}
impl S {
#[link_section = "1800"]
fn inside_abc_123(&self) { }
}
impl Tr for S {
#[link_section = "1800"]
fn inside_tr_no_default(&self) { }
}
#[link_section = "1800"]
fn should_always_link() { }
}

View file

@ -210,7 +210,7 @@ LL | #![reexport_test_harness_main = "2900"]
| +
warning: attribute should be applied to an `extern` block with non-Rust ABI
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:695:1
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:721:1
|
LL | #[link(name = "x")]
| ^^^^^^^^^^^^^^^^^^^
@ -226,7 +226,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: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:771:1
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:797:1
|
LL | #[windows_subsystem = "windows"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -237,7 +237,7 @@ LL | #![windows_subsystem = "windows"]
| +
warning: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:821:1
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:847:1
|
LL | #[crate_type = "0800"]
| ^^^^^^^^^^^^^^^^^^^^^^
@ -248,7 +248,7 @@ LL | #![crate_type = "0800"]
| +
warning: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:845:1
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:871:1
|
LL | #[feature(x0600)]
| ^^^^^^^^^^^^^^^^^
@ -259,7 +259,7 @@ LL | #![feature(x0600)]
| +
warning: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:870:1
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:896:1
|
LL | #[no_main]
| ^^^^^^^^^^
@ -270,7 +270,7 @@ LL | #![no_main]
| +
warning: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:894:1
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:920:1
|
LL | #[no_builtins]
| ^^^^^^^^^^^^^^
@ -377,7 +377,7 @@ LL | #![reexport_test_harness_main = "2900"] impl S { }
| +
warning: attribute should be applied to an `extern` block with non-Rust ABI
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:701:17
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:727:17
|
LL | mod inner { #![link(name = "x")] }
| ------------^^^^^^^^^^^^^^^^^^^^-- not an `extern` block
@ -385,7 +385,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: attribute should be applied to an `extern` block with non-Rust ABI
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:706:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:732:5
|
LL | #[link(name = "x")] fn f() { }
| ^^^^^^^^^^^^^^^^^^^ ---------- not an `extern` block
@ -393,7 +393,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: attribute should be applied to an `extern` block with non-Rust ABI
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:711:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:737:5
|
LL | #[link(name = "x")] struct S;
| ^^^^^^^^^^^^^^^^^^^ --------- not an `extern` block
@ -401,7 +401,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: attribute should be applied to an `extern` block with non-Rust ABI
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:716:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:742:5
|
LL | #[link(name = "x")] type T = S;
| ^^^^^^^^^^^^^^^^^^^ ----------- not an `extern` block
@ -409,7 +409,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: attribute should be applied to an `extern` block with non-Rust ABI
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:721:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:747:5
|
LL | #[link(name = "x")] impl S { }
| ^^^^^^^^^^^^^^^^^^^ ---------- not an `extern` block
@ -417,7 +417,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:726:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:752:5
|
LL | #[link(name = "x")] extern "Rust" {}
| ^^^^^^^^^^^^^^^^^^^
@ -425,13 +425,13 @@ 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: crate-level attribute should be in the root module
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:775:17
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:801:17
|
LL | mod inner { #![windows_subsystem="windows"] }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:778:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:804:5
|
LL | #[windows_subsystem = "windows"] fn f() { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -442,7 +442,7 @@ LL | #![windows_subsystem = "windows"] fn f() { }
| +
warning: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:782:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:808:5
|
LL | #[windows_subsystem = "windows"] struct S;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -453,7 +453,7 @@ LL | #![windows_subsystem = "windows"] struct S;
| +
warning: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:786:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:812:5
|
LL | #[windows_subsystem = "windows"] type T = S;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -464,7 +464,7 @@ LL | #![windows_subsystem = "windows"] type T = S;
| +
warning: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:790:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:816:5
|
LL | #[windows_subsystem = "windows"] impl S { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -475,13 +475,13 @@ LL | #![windows_subsystem = "windows"] impl S { }
| +
warning: crate-level attribute should be in the root module
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:825:17
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:851:17
|
LL | mod inner { #![crate_type="0800"] }
| ^^^^^^^^^^^^^^^^^^^^^
warning: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:828:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:854:5
|
LL | #[crate_type = "0800"] fn f() { }
| ^^^^^^^^^^^^^^^^^^^^^^
@ -492,7 +492,7 @@ LL | #![crate_type = "0800"] fn f() { }
| +
warning: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:832:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:858:5
|
LL | #[crate_type = "0800"] struct S;
| ^^^^^^^^^^^^^^^^^^^^^^
@ -503,7 +503,7 @@ LL | #![crate_type = "0800"] struct S;
| +
warning: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:836:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:862:5
|
LL | #[crate_type = "0800"] type T = S;
| ^^^^^^^^^^^^^^^^^^^^^^
@ -514,7 +514,7 @@ LL | #![crate_type = "0800"] type T = S;
| +
warning: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:840:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:866:5
|
LL | #[crate_type = "0800"] impl S { }
| ^^^^^^^^^^^^^^^^^^^^^^
@ -525,13 +525,13 @@ LL | #![crate_type = "0800"] impl S { }
| +
warning: crate-level attribute should be in the root module
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:849:17
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:875:17
|
LL | mod inner { #![feature(x0600)] }
| ^^^^^^^^^^^^^^^^^^
warning: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:852:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:878:5
|
LL | #[feature(x0600)] fn f() { }
| ^^^^^^^^^^^^^^^^^
@ -542,7 +542,7 @@ LL | #![feature(x0600)] fn f() { }
| +
warning: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:856:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:882:5
|
LL | #[feature(x0600)] struct S;
| ^^^^^^^^^^^^^^^^^
@ -553,7 +553,7 @@ LL | #![feature(x0600)] struct S;
| +
warning: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:860:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:886:5
|
LL | #[feature(x0600)] type T = S;
| ^^^^^^^^^^^^^^^^^
@ -564,7 +564,7 @@ LL | #![feature(x0600)] type T = S;
| +
warning: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:864:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:890:5
|
LL | #[feature(x0600)] impl S { }
| ^^^^^^^^^^^^^^^^^
@ -575,13 +575,13 @@ LL | #![feature(x0600)] impl S { }
| +
warning: crate-level attribute should be in the root module
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:874:17
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:900:17
|
LL | mod inner { #![no_main] }
| ^^^^^^^^^^^
warning: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:877:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:903:5
|
LL | #[no_main] fn f() { }
| ^^^^^^^^^^
@ -592,7 +592,7 @@ LL | #![no_main] fn f() { }
| +
warning: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:881:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:907:5
|
LL | #[no_main] struct S;
| ^^^^^^^^^^
@ -603,7 +603,7 @@ LL | #![no_main] struct S;
| +
warning: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:885:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:911:5
|
LL | #[no_main] type T = S;
| ^^^^^^^^^^
@ -614,7 +614,7 @@ LL | #![no_main] type T = S;
| +
warning: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:889:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:915:5
|
LL | #[no_main] impl S { }
| ^^^^^^^^^^
@ -625,13 +625,13 @@ LL | #![no_main] impl S { }
| +
warning: crate-level attribute should be in the root module
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:898:17
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:924:17
|
LL | mod inner { #![no_builtins] }
| ^^^^^^^^^^^^^^^
warning: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:901:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:927:5
|
LL | #[no_builtins] fn f() { }
| ^^^^^^^^^^^^^^
@ -642,7 +642,7 @@ LL | #![no_builtins] fn f() { }
| +
warning: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:905:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:931:5
|
LL | #[no_builtins] struct S;
| ^^^^^^^^^^^^^^
@ -653,7 +653,7 @@ LL | #![no_builtins] struct S;
| +
warning: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:909:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:935:5
|
LL | #[no_builtins] type T = S;
| ^^^^^^^^^^^^^^
@ -664,7 +664,7 @@ LL | #![no_builtins] type T = S;
| +
warning: crate-level attribute should be an inner attribute
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:913:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:939:5
|
LL | #[no_builtins] impl S { }
| ^^^^^^^^^^^^^^
@ -1257,8 +1257,17 @@ 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!
= help: `#[link_section]` can be applied to functions and statics
warning: `#[link_section]` attribute cannot be used on traits
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:691:5
|
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!
= help: `#[link_section]` can be applied to functions and statics
warning: `#[must_use]` attribute cannot be used on modules
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:746:1
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:772:1
|
LL | #[must_use]
| ^^^^^^^^^^^
@ -1267,7 +1276,7 @@ LL | #[must_use]
= help: `#[must_use]` can be applied to functions, data types, unions, and traits
warning: `#[must_use]` attribute cannot be used on modules
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:751:17
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:777:17
|
LL | mod inner { #![must_use] }
| ^^^^^^^^^^^^
@ -1276,7 +1285,7 @@ LL | mod inner { #![must_use] }
= help: `#[must_use]` can be applied to functions, data types, unions, and traits
warning: `#[must_use]` attribute cannot be used on type aliases
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:760:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:786:5
|
LL | #[must_use] type T = S;
| ^^^^^^^^^^^
@ -1285,7 +1294,7 @@ LL | #[must_use] type T = S;
= help: `#[must_use]` can be applied to functions, data types, unions, and traits
warning: `#[must_use]` attribute cannot be used on inherent impl blocks
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:765:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:791:5
|
LL | #[must_use] impl S { }
| ^^^^^^^^^^^
@ -1294,13 +1303,13 @@ LL | #[must_use] impl S { }
= help: `#[must_use]` can be applied to functions, data types, unions, and traits
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_name]`
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:797:1
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:823: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:799:1
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:825:1
|
LL | / mod crate_name {
LL | |
@ -1310,67 +1319,67 @@ LL | | }
| |_^
warning: the `#![crate_name]` attribute can only be used at the crate root
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:801:17
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:827: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:804:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:830: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:804:28
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:830: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:808:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:834: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:808:28
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:834: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:812:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:838: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:812:28
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:838: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:816:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:842: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:816:28
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:842:28
|
LL | #[crate_name = "0900"] 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:918:1
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:944: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:920:1
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:946:1
|
LL | / mod recursion_limit {
LL | |
@ -1380,67 +1389,67 @@ LL | | }
| |_^
warning: the `#![recursion_limit]` attribute can only be used at the crate root
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:922:17
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:948: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:925:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:951: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:925:31
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:951: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:929:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:955: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:929:31
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:955: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:933:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:959: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:933:31
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:959: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:937:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:963: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:937:31
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:963: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:942:1
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:968: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:944:1
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:970:1
|
LL | / mod type_length_limit {
LL | |
@ -1450,55 +1459,55 @@ LL | | }
| |_^
warning: the `#![type_length_limit]` attribute can only be used at the crate root
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:946:17
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:972: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:949:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:975: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:949:33
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:975: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:953:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:979: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:953:33
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:979: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:957:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:983: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:957:33
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:983: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:961:5
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:987: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:961:33
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:987:33
|
LL | #[type_length_limit="0100"] impl S { }
| ^^^^^^^^^^
@ -1566,5 +1575,5 @@ LL | #![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!
= help: `#[must_use]` can be applied to functions, data types, unions, and traits
warning: 173 warnings emitted
warning: 174 warnings emitted