diff --git a/clippy_lints/src/attrs/mod.rs b/clippy_lints/src/attrs/mod.rs index 8f430ae601a..5d99001e5aa 100644 --- a/clippy_lints/src/attrs/mod.rs +++ b/clippy_lints/src/attrs/mod.rs @@ -310,8 +310,8 @@ /// ```rust,ignore /// #[allow(unused_mut)] /// fn foo() -> usize { - /// let mut a = Vec::new(); - /// a.len() + /// let mut a = Vec::new(); + /// a.len() /// } /// ``` /// Use instead: diff --git a/clippy_lints/src/operators/mod.rs b/clippy_lints/src/operators/mod.rs index 9baecff801f..9e8a821c3f4 100644 --- a/clippy_lints/src/operators/mod.rs +++ b/clippy_lints/src/operators/mod.rs @@ -80,7 +80,7 @@ /// ```no_run /// // `n` can be any number, including `i32::MAX`. /// fn foo(n: i32) -> i32 { - /// n + 1 + /// n + 1 /// } /// ``` /// diff --git a/declare_clippy_lint/src/lib.rs b/declare_clippy_lint/src/lib.rs index fd366b6b262..6aa24329b06 100644 --- a/declare_clippy_lint/src/lib.rs +++ b/declare_clippy_lint/src/lib.rs @@ -156,7 +156,7 @@ pub fn declare_clippy_lint(input: TokenStream) -> TokenStream { let category_variant = format_ident!("{category}"); let name_span = name.span().unwrap(); - let location = format!("{}#{}", name_span.source_file().path().display(), name_span.line()); + let location = format!("{}#L{}", name_span.source_file().path().display(), name_span.line()); let version = match version { Some(version) => quote!(Some(#version)),