Skip to content

Commit

Permalink
Finally (finally) ((finally!!!!)) fix spans for the standard library
Browse files Browse the repository at this point in the history
  • Loading branch information
jyn514 committed Apr 24, 2021
1 parent c44c64d commit ba36142
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/librustdoc/clean/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,12 @@ impl Item {
}

crate fn span(&self, tcx: TyCtxt<'_>) -> Span {
let kind = match &*self.kind {
ItemKind::StrippedItem(k) => k,
_ => &*self.kind,
};
if let ItemKind::ModuleItem(Module { span, .. }) | ItemKind::ImplItem(Impl { span, .. }) =
&*self.kind
kind
{
*span
} else if self.is_fake() {
Expand Down

0 comments on commit ba36142

Please sign in to comment.