RPITIT placeholder items
This commit is contained in:
parent
c6861df836
commit
78b962a4f3
21 changed files with 70 additions and 2 deletions
|
@ -685,6 +685,7 @@ impl<'tcx> SaveContext<'tcx> {
|
|||
| HirDefKind::AssocTy
|
||||
| HirDefKind::Trait
|
||||
| HirDefKind::OpaqueTy
|
||||
| HirDefKind::ImplTraitPlaceholder
|
||||
| HirDefKind::TyParam,
|
||||
def_id,
|
||||
) => Some(Ref { kind: RefKind::Type, span, ref_id: id_from_def_id(def_id) }),
|
||||
|
|
|
@ -320,6 +320,10 @@ impl<'hir> Sig for hir::Ty<'hir> {
|
|||
let item = scx.tcx.hir().item(item_id);
|
||||
item.make(offset, Some(item_id.hir_id()), scx)
|
||||
}
|
||||
hir::TyKind::ImplTraitInTrait(item_id) => {
|
||||
let item = scx.tcx.hir().item(item_id);
|
||||
item.make(offset, Some(item_id.hir_id()), scx)
|
||||
}
|
||||
hir::TyKind::Typeof(_) | hir::TyKind::Infer | hir::TyKind::Err => Err("Ty"),
|
||||
}
|
||||
}
|
||||
|
@ -562,6 +566,7 @@ impl<'hir> Sig for hir::Item<'hir> {
|
|||
hir::ItemKind::GlobalAsm(_) => Err("global asm"),
|
||||
hir::ItemKind::ExternCrate(_) => Err("extern crate"),
|
||||
hir::ItemKind::OpaqueTy(..) => Err("opaque type"),
|
||||
hir::ItemKind::ImplTraitPlaceholder(..) => Err("opaque type in trait"),
|
||||
// FIXME should implement this (e.g., pub use).
|
||||
hir::ItemKind::Use(..) => Err("import"),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue