Skip to content

Commit a12e69d

Browse files
committed
ill_formed_attribute_input -> deny
1 parent 0cbd06a commit a12e69d

File tree

5 files changed

+28
-32
lines changed

5 files changed

+28
-32
lines changed

src/librustc/lint/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ declare_lint! {
408408
pub mod parser {
409409
declare_lint! {
410410
pub ILL_FORMED_ATTRIBUTE_INPUT,
411-
Warn,
411+
Deny,
412412
"ill-formed attribute inputs that were previously accepted and used in practice",
413413
@future_incompatible = super::FutureIncompatibleInfo {
414414
reference: "issue #57571 <https://github.com/rust-lang/rust/issues/57571>",

src/test/ui/feature-gate/issue-43106-gating-of-inline.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ mod inline {
1515
//~^ ERROR attribute should be applied to function or closure
1616

1717
#[inline = "2100"] fn f() { }
18-
//~^ WARN attribute must be of the form
18+
//~^ ERROR attribute must be of the form
1919
//~| WARN this was previously accepted
2020

2121
#[inline] struct S;

src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
warning: attribute must be of the form `#[inline]` or `#[inline(always|never)]`
1+
error: attribute must be of the form `#[inline]` or `#[inline(always|never)]`
22
--> $DIR/issue-43106-gating-of-inline.rs:17:5
33
|
44
LL | #[inline = "2100"] fn f() { }
55
| ^^^^^^^^^^^^^^^^^^
66
|
7-
= note: `#[warn(ill_formed_attribute_input)]` on by default
7+
= note: `#[deny(ill_formed_attribute_input)]` on by default
88
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
99
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
1010

@@ -47,6 +47,6 @@ error[E0518]: attribute should be applied to function or closure
4747
LL | #[inline] impl S { }
4848
| ^^^^^^^^^ ---------- not a function or closure
4949

50-
error: aborting due to 5 previous errors
50+
error: aborting due to 6 previous errors
5151

5252
For more information about this error, try `rustc --explain E0518`.
+10-16
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
1-
// build-pass (FIXME(62277): could be check-pass?)
1+
#[doc] //~ ERROR attribute must be of the form
2+
//~^ WARN this was previously accepted
3+
#[ignore()] //~ ERROR attribute must be of the form
4+
//~^ WARN this was previously accepted
5+
#[inline = ""] //~ ERROR attribute must be of the form
6+
//~^ WARN this was previously accepted
7+
#[link] //~ ERROR attribute must be of the form
8+
//~^ WARN this was previously accepted
9+
#[link = ""] //~ ERROR attribute must be of the form
10+
//~^ WARN this was previously accepted
211

3-
#[doc]
4-
//~^ WARN attribute must be of the form
5-
//~| WARN this was previously accepted
6-
#[ignore()]
7-
//~^ WARN attribute must be of the form
8-
//~| WARN this was previously accepted
9-
#[inline = ""]
10-
//~^ WARN attribute must be of the form
11-
//~| WARN this was previously accepted
12-
#[link]
13-
//~^WARN attribute must be of the form
14-
//~| WARN this was previously accepted
15-
#[link = ""]
16-
//~^ WARN attribute must be of the form
17-
//~| WARN this was previously accepted
1812
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,48 @@
1-
warning: attribute must be of the form `#[doc(hidden|inline|...)]` or `#[doc = "string"]`
2-
--> $DIR/malformed-regressions.rs:3:1
1+
error: attribute must be of the form `#[doc(hidden|inline|...)]` or `#[doc = "string"]`
2+
--> $DIR/malformed-regressions.rs:1:1
33
|
44
LL | #[doc]
55
| ^^^^^^
66
|
7-
= note: `#[warn(ill_formed_attribute_input)]` on by default
7+
= note: `#[deny(ill_formed_attribute_input)]` on by default
88
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
99
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
1010

11-
warning: attribute must be of the form `#[ignore]` or `#[ignore = "reason"]`
12-
--> $DIR/malformed-regressions.rs:6:1
11+
error: attribute must be of the form `#[ignore]` or `#[ignore = "reason"]`
12+
--> $DIR/malformed-regressions.rs:3:1
1313
|
1414
LL | #[ignore()]
1515
| ^^^^^^^^^^^
1616
|
1717
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
1818
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
1919

20-
warning: attribute must be of the form `#[inline]` or `#[inline(always|never)]`
21-
--> $DIR/malformed-regressions.rs:9:1
20+
error: attribute must be of the form `#[inline]` or `#[inline(always|never)]`
21+
--> $DIR/malformed-regressions.rs:5:1
2222
|
2323
LL | #[inline = ""]
2424
| ^^^^^^^^^^^^^^
2525
|
2626
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
2727
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
2828

29-
warning: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...", /*opt*/ cfg = "...")]`
30-
--> $DIR/malformed-regressions.rs:12:1
29+
error: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...", /*opt*/ cfg = "...")]`
30+
--> $DIR/malformed-regressions.rs:7:1
3131
|
3232
LL | #[link]
3333
| ^^^^^^^
3434
|
3535
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
3636
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
3737

38-
warning: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...", /*opt*/ cfg = "...")]`
39-
--> $DIR/malformed-regressions.rs:15:1
38+
error: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...", /*opt*/ cfg = "...")]`
39+
--> $DIR/malformed-regressions.rs:9:1
4040
|
4141
LL | #[link = ""]
4242
| ^^^^^^^^^^^^
4343
|
4444
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
4545
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
4646

47+
error: aborting due to 5 previous errors
48+

0 commit comments

Comments
 (0)