From 150916047beaae94096d2fdc95b88fbdb837f242 Mon Sep 17 00:00:00 2001 From: bishtpawan Date: Tue, 24 Mar 2020 17:11:04 +0530 Subject: [PATCH] Add explanation for inner attribute --- src/librustc_error_codes/error_codes/E0710.md | 42 +++++++++++++++---- 1 file 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 cbb667d832d5..6f2dfcd23239 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 + } } ```