rustdoc: Use impl_id
and for_
DefId's for Blanket item id
This commit is contained in:
parent
21424d2966
commit
a89912c8c3
@ -96,7 +96,7 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> {
|
||||
name: None,
|
||||
attrs: Default::default(),
|
||||
visibility: Inherited,
|
||||
def_id: ItemId::Blanket { trait_: trait_def_id, for_: item_def_id },
|
||||
def_id: ItemId::Blanket { impl_id: impl_def_id, for_: item_def_id },
|
||||
kind: box ImplItem(Impl {
|
||||
span: self.cx.tcx.def_span(impl_def_id).clean(self.cx),
|
||||
unsafety: hir::Unsafety::Normal,
|
||||
|
@ -57,7 +57,7 @@
|
||||
/// Identifier that is used for auto traits.
|
||||
Auto { trait_: DefId, for_: DefId },
|
||||
/// Identifier that is used for blanket implementations.
|
||||
Blanket { trait_: DefId, for_: DefId },
|
||||
Blanket { impl_id: DefId, for_: DefId },
|
||||
/// Identifier for primitive types.
|
||||
Primitive(PrimitiveType, CrateNum),
|
||||
}
|
||||
|
@ -182,8 +182,8 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
|
||||
match did {
|
||||
ItemId::DefId(did) => Id(format!("{}", DisplayDefId(did))),
|
||||
ItemId::Blanket { for_, trait_ } => {
|
||||
Id(format!("b:{}-{}", DisplayDefId(trait_), DisplayDefId(for_)))
|
||||
ItemId::Blanket { for_, impl_id } => {
|
||||
Id(format!("b:{}-{}", DisplayDefId(impl_id), DisplayDefId(for_)))
|
||||
}
|
||||
ItemId::Auto { for_, trait_ } => {
|
||||
Id(format!("a:{}-{}", DisplayDefId(trait_), DisplayDefId(for_)))
|
||||
|
Loading…
Reference in New Issue
Block a user