Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transition future compat lints to {ERROR, DENY} #63247

Closed
wants to merge 12 commits into from
Prev Previous commit
Next Next commit
ill_formed_attribute_input -> deny
Centril committed Aug 3, 2019
commit 13d2d7f63b1e1c99b0cd15dcad46bfeceab0f110
2 changes: 1 addition & 1 deletion src/librustc/lint/builtin.rs
Original file line number Diff line number Diff line change
@@ -309,7 +309,7 @@ declare_lint! {
pub mod parser {
declare_lint! {
pub ILL_FORMED_ATTRIBUTE_INPUT,
Warn,
Deny,
"ill-formed attribute inputs that were previously accepted and used in practice"
}

2 changes: 1 addition & 1 deletion src/test/ui/feature-gate/issue-43106-gating-of-inline.rs
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ mod inline {
//~^ ERROR attribute should be applied to function or closure

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

#[inline] struct S;
6 changes: 3 additions & 3 deletions src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
warning: attribute must be of the form `#[inline]` or `#[inline(always|never)]`
error: attribute must be of the form `#[inline]` or `#[inline(always|never)]`
--> $DIR/issue-43106-gating-of-inline.rs:17:5
|
LL | #[inline = "2100"] fn f() { }
| ^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(ill_formed_attribute_input)]` on by default
= note: `#[deny(ill_formed_attribute_input)]` 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 #57571 <https://github.com/rust-lang/rust/issues/57571>

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

error: aborting due to 5 previous errors
error: aborting due to 6 previous errors

For more information about this error, try `rustc --explain E0518`.
16 changes: 10 additions & 6 deletions src/test/ui/malformed/malformed-regressions.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
// build-pass (FIXME(62277): could be check-pass?)
#[doc] //~ ERROR attribute must be of the form
//~^ WARN this was previously accepted
#[ignore()] //~ ERROR attribute must be of the form
//~^ WARN this was previously accepted
#[inline = ""] //~ ERROR attribute must be of the form
//~^ WARN this was previously accepted
#[link] //~ ERROR attribute must be of the form
//~^ WARN this was previously accepted
#[link = ""] //~ ERROR attribute must be of the form
//~^ WARN this was previously accepted

#[doc] //~ WARN attribute must be of the form
#[ignore()] //~ WARN attribute must be of the form
#[inline = ""] //~ WARN attribute must be of the form
#[link] //~ WARN attribute must be of the form
#[link = ""] //~ WARN attribute must be of the form
fn main() {}
22 changes: 12 additions & 10 deletions src/test/ui/malformed/malformed-regressions.stderr
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
warning: attribute must be of the form `#[doc(hidden|inline|...)]` or `#[doc = "string"]`
--> $DIR/malformed-regressions.rs:3:1
error: attribute must be of the form `#[doc(hidden|inline|...)]` or `#[doc = "string"]`
--> $DIR/malformed-regressions.rs:1:1
|
LL | #[doc]
| ^^^^^^
|
= note: `#[warn(ill_formed_attribute_input)]` on by default
= note: `#[deny(ill_formed_attribute_input)]` 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 #57571 <https://github.com/rust-lang/rust/issues/57571>

warning: attribute must be of the form `#[ignore]` or `#[ignore = "reason"]`
--> $DIR/malformed-regressions.rs:4:1
error: attribute must be of the form `#[ignore]` or `#[ignore = "reason"]`
--> $DIR/malformed-regressions.rs:3:1
|
LL | #[ignore()]
| ^^^^^^^^^^^
|
= 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 #57571 <https://github.com/rust-lang/rust/issues/57571>

warning: attribute must be of the form `#[inline]` or `#[inline(always|never)]`
error: attribute must be of the form `#[inline]` or `#[inline(always|never)]`
--> $DIR/malformed-regressions.rs:5:1
|
LL | #[inline = ""]
@@ -26,23 +26,25 @@ LL | #[inline = ""]
= 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 #57571 <https://github.com/rust-lang/rust/issues/57571>

warning: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...",
error: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...",
/*opt*/ cfg = "...")]`
--> $DIR/malformed-regressions.rs:6:1
--> $DIR/malformed-regressions.rs:7:1
|
LL | #[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 #57571 <https://github.com/rust-lang/rust/issues/57571>

warning: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...",
error: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...",
/*opt*/ cfg = "...")]`
--> $DIR/malformed-regressions.rs:7:1
--> $DIR/malformed-regressions.rs:9:1
|
LL | #[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 #57571 <https://github.com/rust-lang/rust/issues/57571>

error: aborting due to 5 previous errors