From 1cf72183cfe0a29708130f59c79176128b06fcae Mon Sep 17 00:00:00 2001 From: blyxyas Date: Sat, 11 Mar 2023 01:08:03 +0100 Subject: [PATCH] Add ignore flag to code fragments --- clippy_lints/src/allow_attribute.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/allow_attribute.rs b/clippy_lints/src/allow_attribute.rs index 805c804119a2..2258b973307d 100644 --- a/clippy_lints/src/allow_attribute.rs +++ b/clippy_lints/src/allow_attribute.rs @@ -12,7 +12,7 @@ declare_clippy_lint! { /// ### Why is this bad? /// Using `#[allow]` isn't bad, but `#[expect]` may be preferred as it lints if the code **doesn't** produce a warning. /// ### Example - /// ```rust + /// ```rust,ignore /// #[allow(unused_mut)] /// fn foo() -> usize { /// let mut a = Vec::new(); @@ -20,7 +20,7 @@ declare_clippy_lint! { ///} /// ``` /// Use instead: - /// ```rust + /// ```rust,ignore /// # #![feature(lint_reasons)] /// #[expect(unused_mut)] /// fn foo() -> usize {