Add ui test for command line lints with tool names

This adds a ui test to make sure rustc accepts lint arguments such as
`-A clippy::foo` when clippy is disabled.
This commit is contained in:
Eric Holk 2021-06-25 14:28:03 -07:00
parent 6e0b554619
commit 65b28a987b
3 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,7 @@
// compile-flags: -A known_tool::foo
// check-pass
#![feature(register_tool)]
#![register_tool(known_tool)]
fn main() {}

View File

@ -0,0 +1,4 @@
// compile-flags: -A unknown_tool::foo
// check-fail
fn main() {}

View File

@ -0,0 +1,11 @@
error[E0602]: unknown lint: `unknown_tool::foo`
|
= note: requested on the command line with `-A unknown_tool::foo`
error[E0602]: unknown lint: `unknown_tool::foo`
|
= note: requested on the command line with `-A unknown_tool::foo`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0602`.