Skip to content

Commit ba36142

Browse files
committed
Finally (finally) ((finally!!!!)) fix spans for the standard library
1 parent c44c64d commit ba36142

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/librustdoc/clean/types.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,12 @@ impl Item {
264264
}
265265

266266
crate fn span(&self, tcx: TyCtxt<'_>) -> Span {
267+
let kind = match &*self.kind {
268+
ItemKind::StrippedItem(k) => k,
269+
_ => &*self.kind,
270+
};
267271
if let ItemKind::ModuleItem(Module { span, .. }) | ItemKind::ImplItem(Impl { span, .. }) =
268-
&*self.kind
272+
kind
269273
{
270274
*span
271275
} else if self.is_fake() {

0 commit comments

Comments
 (0)