Rollup merge of #63930 - estebank:rustdoc-ice, r=GuillaumeGomez
Account for doc comments coming from proc macros without spans Fix https://github.com/rust-lang/rust/issues/63821.
This commit is contained in:
commit
d855bde457
5 changed files with 46 additions and 13 deletions
|
@ -81,7 +81,7 @@ impl<'a, 'tcx> SyntaxChecker<'a, 'tcx> {
|
|||
// We couldn't calculate the span of the markdown block that had the error, so our
|
||||
// diagnostics are going to be a bit lacking.
|
||||
let mut diag = self.cx.sess().struct_span_warn(
|
||||
super::span_of_attrs(&item.attrs),
|
||||
super::span_of_attrs(&item.attrs).unwrap_or(item.source.span()),
|
||||
"doc comment contains an invalid Rust code block",
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue