diff options
| author | bishtpawan <pawan.bisht@knoldus.com> | 2020-03-24 17:11:04 +0530 |
|---|---|---|
| committer | bishtpawan <pawan.bisht@knoldus.com> | 2020-03-24 17:11:04 +0530 |
| commit | 150916047beaae94096d2fdc95b88fbdb837f242 (patch) | |
| tree | 2426ac4c7095cb956a0adc01b5a3a8bdfb451176 /src/librustc_error_codes/error_codes | |
| parent | 10226daa4ee7a2bd61a1d0dd86581990c782278f (diff) | |
| download | rust-150916047beaae94096d2fdc95b88fbdb837f242.tar.gz rust-150916047beaae94096d2fdc95b88fbdb837f242.zip | |
Add explanation for inner attribute
Diffstat (limited to 'src/librustc_error_codes/error_codes')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0710.md | 42 |
1 files changed, 35 insertions, 7 deletions
diff --git a/src/librustc_error_codes/error_codes/E0710.md b/src/librustc_error_codes/error_codes/E0710.md index cbb667d832d..6f2dfcd2323 100644 --- a/src/librustc_error_codes/error_codes/E0710.md +++ b/src/librustc_error_codes/error_codes/E0710.md @@ -1,13 +1,27 @@ An unknown tool name found in scoped lint -Erroneous code example: +Erroneous code examples: ```compile_fail,E0710 #[allow(clipp::filter_map)] // error!` fn main() { - /** - *business logic - */ + // business logic +} +``` + +```compile_fail,E0710 +#[warn(clipp::filter_map)] // error!` +fn main() { + // business logic +} +``` + +```compile_fail,E0710 +fn main() { + #![deny(clipp::filter_map)] //error! + fn filter() { + //logic + } } ``` @@ -17,8 +31,22 @@ forget to import it in you project: ``` #[allow(clippy::filter_map)] // ok! fn main() { - /** - *business logic - */ + // business logic +} +``` + +``` +#[warn(clippy::filter_map)] // ok! +fn main() { + // business logic +} +``` + +``` +fn main() { + #![deny(clippy::filter_map)] // ok! + fn filter() { + //logic + } } ``` |
