]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/tabs_in_doc_comments.rs
Merge commit 'a5d597637dcb78dc73f93561ce474f23d4177c35' into clippyup
[rust.git] / src / tools / clippy / clippy_lints / src / tabs_in_doc_comments.rs
index 6a73b94d87e488ec6feaaa24f2d0119a637438a9..c9b4b245f4cc25019d130f05b33151bf80a81bdf 100644 (file)
@@ -51,6 +51,7 @@
     ///    second_string: String,
     ///}
     /// ```
+    #[clippy::version = "1.41.0"]
     pub TABS_IN_DOC_COMMENTS,
     style,
     "using tabs in doc comments is not recommended"
@@ -69,6 +70,7 @@ fn warn_if_tabs_in_doc(cx: &EarlyContext<'_>, attr: &ast::Attribute) {
                     attr.span.lo() + BytePos(3 + lo),
                     attr.span.lo() + BytePos(3 + hi),
                     attr.span.ctxt(),
+                    attr.span.parent(),
                 );
                 span_lint_and_sugg(
                     cx,