Rollup merge of #70918 - tobithiel:fix_forbid_override, r=davidtwco

rustc_session: forbid lints override regardless of position

Addresses the regression reported in #70819 for command line arguments, but does not address the source code flag regression.
This commit is contained in:
Mazdak Farrokhzad 2020-04-09 05:29:47 +02:00 committed by GitHub
commit 09052a6d35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 2 deletions

View file

@ -0,0 +1,7 @@
// aux-build:lint-group-plugin-test.rs
// compile-flags: -F unused -A unused
fn main() {
let x = 1;
//~^ ERROR unused variable: `x`
}

View file

@ -0,0 +1,10 @@
error: unused variable: `x`
--> $DIR/lint-group-forbid-always-trumps-cli.rs:5:9
|
LL | let x = 1;
| ^ help: if this is intentional, prefix it with an underscore: `_x`
|
= note: `-F unused-variables` implied by `-F unused`
error: aborting due to previous error