Skip to content

Commit 65b28a9

Browse files
committed
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.
1 parent 6e0b554 commit 65b28a9

3 files changed

+22
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// compile-flags: -A known_tool::foo
2+
// check-pass
3+
4+
#![feature(register_tool)]
5+
#![register_tool(known_tool)]
6+
7+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// compile-flags: -A unknown_tool::foo
2+
// check-fail
3+
4+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
error[E0602]: unknown lint: `unknown_tool::foo`
2+
|
3+
= note: requested on the command line with `-A unknown_tool::foo`
4+
5+
error[E0602]: unknown lint: `unknown_tool::foo`
6+
|
7+
= note: requested on the command line with `-A unknown_tool::foo`
8+
9+
error: aborting due to 2 previous errors
10+
11+
For more information about this error, try `rustc --explain E0602`.

0 commit comments

Comments
 (0)