diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-03-25 19:28:11 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-25 19:28:11 +0100 |
| commit | 3586ab615e40fdc5a0f2bb40d201753b1e36d875 (patch) | |
| tree | 3ea7bbeb3757b247ea3e9cda0165d94036a083fd /src | |
| parent | 1154023118c81237fad4498d9ddbaf277fe41ab5 (diff) | |
| parent | 5c65568f0b0b5f97fc02397c974d206bc3ff0f9d (diff) | |
| download | rust-3586ab615e40fdc5a0f2bb40d201753b1e36d875.tar.gz rust-3586ab615e40fdc5a0f2bb40d201753b1e36d875.zip | |
Rollup merge of #70352 - bishtpawan:doc/61137-add-long-error-code-e0710, r=Dylan-DPC
Add long error explanation for E0710 Add long explanation for the E0710 error code Part of #61137 r? @GuillaumeGomez
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_error_codes/error_codes.rs | 2 | ||||
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0710.md | 34 | ||||
| -rw-r--r-- | src/test/ui/tool_lints.stderr | 1 | ||||
| -rw-r--r-- | src/test/ui/unknown-lint-tool-name.stderr | 1 |
4 files changed, 37 insertions, 1 deletions
diff --git a/src/librustc_error_codes/error_codes.rs b/src/librustc_error_codes/error_codes.rs index 33bfaddc39c..86da425060e 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 00000000000..d9cefe2a6da --- /dev/null +++ b/src/librustc_error_codes/error_codes/E0710.md @@ -0,0 +1,34 @@ +An unknown tool name found in scoped lint + +Erroneous code examples: + +```compile_fail,E0710 +#[allow(clipp::filter_map)] // error!` +fn main() { + // business logic +} +``` + +```compile_fail,E0710 +#[warn(clipp::filter_map)] // error!` +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 +} +``` + +``` +#[warn(clippy::filter_map)] // ok! +fn main() { + // business logic +} +``` diff --git a/src/test/ui/tool_lints.stderr b/src/test/ui/tool_lints.stderr index 86f87784eaf..1bcd7fd735d 100644 --- a/src/test/ui/tool_lints.stderr +++ b/src/test/ui/tool_lints.stderr @@ -18,3 +18,4 @@ LL | #[warn(foo::bar)] error: aborting due to 3 previous errors +For more information about this error, try `rustc --explain E0710`. diff --git a/src/test/ui/unknown-lint-tool-name.stderr b/src/test/ui/unknown-lint-tool-name.stderr index 1940f61a47b..414816d229c 100644 --- a/src/test/ui/unknown-lint-tool-name.stderr +++ b/src/test/ui/unknown-lint-tool-name.stderr @@ -36,3 +36,4 @@ LL | #[allow(foo::bar)] error: aborting due to 6 previous errors +For more information about this error, try `rustc --explain E0710`. |
