mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
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:
parent
6e0b554619
commit
65b28a987b
7
src/test/ui/lint/command-line-register-lint-tool.rs
Normal file
7
src/test/ui/lint/command-line-register-lint-tool.rs
Normal file
@ -0,0 +1,7 @@
|
||||
// compile-flags: -A known_tool::foo
|
||||
// check-pass
|
||||
|
||||
#![feature(register_tool)]
|
||||
#![register_tool(known_tool)]
|
||||
|
||||
fn main() {}
|
@ -0,0 +1,4 @@
|
||||
// compile-flags: -A unknown_tool::foo
|
||||
// check-fail
|
||||
|
||||
fn main() {}
|
@ -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`.
|
Loading…
Reference in New Issue
Block a user