change to a struct variant

This commit is contained in:
Ellen 2022-02-09 11:03:27 +00:00
parent 9cdefd763b
commit e81e09a24e
27 changed files with 68 additions and 57 deletions

View file

@ -921,7 +921,7 @@ impl<'tcx> DumpVisitor<'tcx> {
| HirDefKind::AssocTy,
_,
)
| Res::SelfTy(..) => {
| Res::SelfTy { .. } => {
self.dump_path_segment_ref(id, &hir::PathSegment::from_ident(ident));
}
def => {

View file

@ -749,7 +749,7 @@ impl<'tcx> SaveContext<'tcx> {
_,
)
| Res::PrimTy(..)
| Res::SelfTy(..)
| Res::SelfTy { .. }
| Res::ToolMod
| Res::NonMacroAttr(..)
| Res::SelfCtor(..)
@ -814,7 +814,7 @@ impl<'tcx> SaveContext<'tcx> {
fn lookup_def_id(&self, ref_id: hir::HirId) -> Option<DefId> {
match self.get_path_res(ref_id) {
Res::PrimTy(_) | Res::SelfTy(..) | Res::Err => None,
Res::PrimTy(_) | Res::SelfTy { .. } | Res::Err => None,
def => def.opt_def_id(),
}
}

View file

@ -573,7 +573,7 @@ impl<'hir> Sig for hir::Path<'hir> {
let res = scx.get_path_res(id.ok_or("Missing id for Path")?);
let (name, start, end) = match res {
Res::PrimTy(..) | Res::SelfTy(..) | Res::Err => {
Res::PrimTy(..) | Res::SelfTy { .. } | Res::Err => {
return Ok(Signature { text: path_to_string(self), defs: vec![], refs: vec![] });
}
Res::Def(DefKind::AssocConst | DefKind::Variant | DefKind::Ctor(..), _) => {