From 03bb3bde90a52cfc1d64c15263013d97a3d7aad2 Mon Sep 17 00:00:00 2001 From: bishtpawan Date: Tue, 24 Mar 2020 13:03:01 +0530 Subject: [PATCH] Add long error explanation for E0710 #61137 --- src/librustc_error_codes/error_codes.rs | 2 +- src/librustc_error_codes/error_codes/E0710.md | 25 +++++++++++++++++++ src/test/ui/unknown-lint-tool-name.stderr | 3 +++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 src/librustc_error_codes/error_codes/E0710.md diff --git a/src/librustc_error_codes/error_codes.rs b/src/librustc_error_codes/error_codes.rs index 33bfaddc39c9..86da425060ef 100644 --- a/src/librustc_error_codes/error_codes.rs +++ b/src/librustc_error_codes/error_codes.rs @@ -393,6 +393,7 @@ E0701: include_str!("./error_codes/E0701.md"), E0704: include_str!("./error_codes/E0704.md"), E0705: include_str!("./error_codes/E0705.md"), E0706: include_str!("./error_codes/E0706.md"), +E0710: include_str!("./error_codes/E0710.md"), E0712: include_str!("./error_codes/E0712.md"), E0713: include_str!("./error_codes/E0713.md"), E0714: include_str!("./error_codes/E0714.md"), @@ -604,7 +605,6 @@ E0748: include_str!("./error_codes/E0748.md"), E0708, // `async` non-`move` closures with parameters are not currently // supported // E0709, // multiple different lifetimes used in arguments of `async fn` - E0710, // an unknown tool name found in scoped lint E0711, // a feature has been declared with conflicting stability attributes E0717, // rustc_promotable without stability attribute // E0721, // `await` keyword diff --git a/src/librustc_error_codes/error_codes/E0710.md b/src/librustc_error_codes/error_codes/E0710.md new file mode 100644 index 000000000000..c0b58eb00f31 --- /dev/null +++ b/src/librustc_error_codes/error_codes/E0710.md @@ -0,0 +1,25 @@ +An unknown tool name found in scoped lint + +Erroneous code example: + +```compile_fail,E0710 +#[allow(clipp::filter_map)] // error: an unknown tool name found in scoped lint: `clipp::filter_map` + +fn main() { + /** + *business logic + */ +} +``` + +Please verify you didn't misspell the tool's name or that you didn't +forget to import it in you project: + +``` +#[allow(clippy::filter_map)] // ok! +fn main() { + /** + *business logic + */ +} +``` \ No newline at end of file diff --git a/src/test/ui/unknown-lint-tool-name.stderr b/src/test/ui/unknown-lint-tool-name.stderr index 1940f61a47b6..f98e15f7cf2f 100644 --- a/src/test/ui/unknown-lint-tool-name.stderr +++ b/src/test/ui/unknown-lint-tool-name.stderr @@ -36,3 +36,6 @@ LL | #[allow(foo::bar)] error: aborting due to 6 previous errors +For more information about this error, try `rustc --explain E0710`. + +