mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
e78d78868a
Forbid cannot be overriden. When someome tries to do this anyways, it results in a hard error. That makes sense. Except it doesn't, because macros. Macros may reasonably use `#[deny]` in their expansion to assert that their expanded code follows the lint. This is doesn't work when the output gets expanded into a `forbid()` context. This is pretty silly, since both the macros and the code agree on the lint! Therefore, we allow `#[deny(..)]`ing a lint that's already forbidden, keeping the level at forbid.
20 lines
773 B
Plaintext
20 lines
773 B
Plaintext
error: warn(unused) incompatible with previous forbid
|
|
--> $DIR/issue-70819-dont-override-forbid-in-same-scope.rs:22:13
|
|
|
|
|
LL | #![forbid(unused)]
|
|
| ------ `forbid` level set here
|
|
LL | #![deny(unused)]
|
|
LL | #![warn(unused)]
|
|
| ^^^^^^ overruled by previous forbid
|
|
|
|
|
= 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 #81670 <https://github.com/rust-lang/rust/issues/81670>
|
|
note: the lint level is defined here
|
|
--> $DIR/issue-70819-dont-override-forbid-in-same-scope.rs:17:11
|
|
|
|
|
LL | #![forbid(forbidden_lint_groups)]
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: aborting due to 1 previous error
|
|
|