Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support lint tool names in rustc command line options #86639

Merged
merged 5 commits into from
Jul 8, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/test/ui/lint/command-line-register-lint-tool.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// compile-flags: -A known_tool::foo
// check-pass

#![feature(register_tool)]
#![register_tool(known_tool)]

fn main() {}
4 changes: 4 additions & 0 deletions src/test/ui/lint/command-line-register-unknown-lint-tool.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// compile-flags: -A unknown_tool::foo
// check-fail

fn main() {}
11 changes: 11 additions & 0 deletions src/test/ui/lint/command-line-register-unknown-lint-tool.stderr
Original file line number Diff line number Diff line change
@@ -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`.