We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e0674ef commit 13c28adCopy full SHA for 13c28ad
src/librustc_lint/unused.rs
@@ -16,7 +16,7 @@ use rustc_middle::ty::{self, Ty};
16
use rustc_session::lint::builtin::UNUSED_ATTRIBUTES;
17
use rustc_span::symbol::Symbol;
18
use rustc_span::symbol::{kw, sym};
19
-use rustc_span::{BytePos, Span};
+use rustc_span::{BytePos, Span, DUMMY_SP};
20
21
use log::debug;
22
@@ -415,6 +415,12 @@ trait UnusedDelimLint {
415
msg: &str,
416
keep_space: (bool, bool),
417
) {
418
+ // FIXME(flip1995): Quick and dirty fix for #70814. This should be fixed in rustdoc
419
+ // properly.
420
+ if span == DUMMY_SP {
421
+ return;
422
+ }
423
+
424
cx.struct_span_lint(self.lint(), span, |lint| {
425
let span_msg = format!("unnecessary {} around {}", Self::DELIM_STR, msg);
426
let mut err = lint.build(&span_msg);
0 commit comments