rustc_expand: Mark inner #![test] attributes as soft-unstable
This commit is contained in:
parent
ae6aa22cf2
commit
993bb072ff
8 changed files with 37 additions and 21 deletions
|
|
@ -1,5 +1,6 @@
|
|||
// The non-crate level cases are in issue-43106-gating-of-builtin-attrs.rs.
|
||||
|
||||
#![allow(soft_unstable)]
|
||||
#![test = "4200"]
|
||||
//~^ ERROR cannot determine resolution for the attribute macro `test`
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error: cannot determine resolution for the attribute macro `test`
|
||||
--> $DIR/issue-43106-gating-of-test.rs:3:4
|
||||
--> $DIR/issue-43106-gating-of-test.rs:4:4
|
||||
|
|
||||
LL | #![test = "4200"]
|
||||
| ^^^^
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
// compile-flags: --test
|
||||
|
||||
#![allow(soft_unstable)]
|
||||
#![test] //~ ERROR cannot determine resolution for the attribute macro `test`
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error: cannot determine resolution for the attribute macro `test`
|
||||
--> $DIR/issue-28134.rs:3:4
|
||||
--> $DIR/issue-28134.rs:4:4
|
||||
|
|
||||
LL | #![test]
|
||||
| ^^^^
|
||||
|
|
|
|||
|
|
@ -45,4 +45,9 @@ fn attrs() {
|
|||
//~^ ERROR: custom attributes cannot be applied to expressions
|
||||
}
|
||||
|
||||
fn test_case() {
|
||||
#![test] //~ ERROR inner macro attributes are unstable
|
||||
//~| WARN this was previously accepted
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -76,6 +76,16 @@ LL | let _x = #[identity_attr] println!();
|
|||
= note: see issue #54727 <https://github.com/rust-lang/rust/issues/54727> for more information
|
||||
= help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to 9 previous errors
|
||||
error: inner macro attributes are unstable
|
||||
--> $DIR/proc-macro-gates.rs:49:8
|
||||
|
|
||||
LL | #![test]
|
||||
| ^^^^
|
||||
|
|
||||
= note: `#[deny(soft_unstable)]` on by default
|
||||
= 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 #64266 <https://github.com/rust-lang/rust/issues/64266>
|
||||
|
||||
error: aborting due to 10 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0658`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue