1
Fork 0

Use rustdoc Span in LinkFromSrc directly

This commit is contained in:
Guillaume Gomez 2021-05-05 14:48:41 +02:00 committed by Guillaume Gomez
commit f233a70567
4 changed files with 6 additions and 15 deletions

View file

@ -98,7 +98,7 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> {
visibility: Inherited,
def_id: ItemId::Blanket { impl_id: impl_def_id, for_: item_def_id },
kind: box ImplItem(Impl {
span: Span::from_rustc_span(self.cx.tcx.def_span(impl_def_id)),
span: Span::new(self.cx.tcx.def_span(impl_def_id)),
unsafety: hir::Unsafety::Normal,
generics: (
self.cx.tcx.generics_of(impl_def_id),

View file

@ -1951,14 +1951,6 @@ impl Span {
Self(sp.source_callsite())
}
/// Unless you know what you're doing, use [`Self::new`] instead!
///
/// This function doesn't clean the span at all. Compare with [`Self::new`]'s body to see the
/// difference.
crate fn wrap_raw(sp: rustc_span::Span) -> Span {
Self(sp)
}
crate fn inner(&self) -> rustc_span::Span {
self.0
}