Skip to content

Commit 13d2d7f

Browse files
committed
ill_formed_attribute_input -> deny
1 parent 962d4ec commit 13d2d7f

File tree

5 files changed

+27
-21
lines changed

5 files changed

+27
-21
lines changed

src/librustc/lint/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ declare_lint! {
309309
pub mod parser {
310310
declare_lint! {
311311
pub ILL_FORMED_ATTRIBUTE_INPUT,
312-
Warn,
312+
Deny,
313313
"ill-formed attribute inputs that were previously accepted and used in practice"
314314
}
315315

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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 3 additions & 3 deletions
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`.
Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +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] //~ WARN attribute must be of the form
4-
#[ignore()] //~ WARN attribute must be of the form
5-
#[inline = ""] //~ WARN attribute must be of the form
6-
#[link] //~ WARN attribute must be of the form
7-
#[link = ""] //~ WARN attribute must be of the form
812
fn main() {}
Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
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:4: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)]`
20+
error: attribute must be of the form `#[inline]` or `#[inline(always|never)]`
2121
--> $DIR/malformed-regressions.rs:5:1
2222
|
2323
LL | #[inline = ""]
@@ -26,23 +26,25 @@ LL | #[inline = ""]
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|...",
29+
error: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...",
3030
/*opt*/ cfg = "...")]`
31-
--> $DIR/malformed-regressions.rs:6:1
31+
--> $DIR/malformed-regressions.rs:7:1
3232
|
3333
LL | #[link]
3434
| ^^^^^^^
3535
|
3636
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
3737
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
3838

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

49+
error: aborting due to 5 previous errors
50+

0 commit comments

Comments
 (0)