mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
save-analysis: Simplify match arm for type node def
This commit is contained in:
parent
1ced262653
commit
bcd263e1f1
@ -647,6 +647,10 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
|
||||
Node::Pat(&hir::Pat {
|
||||
node: hir::PatKind::TupleStruct(ref qpath, ..),
|
||||
..
|
||||
}) |
|
||||
Node::Ty(&hir::Ty {
|
||||
node: hir::TyKind::Path(ref qpath),
|
||||
..
|
||||
}) => {
|
||||
let hir_id = self.tcx.hir().node_to_hir_id(id);
|
||||
self.tables.qpath_def(qpath, hir_id)
|
||||
@ -657,11 +661,6 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
|
||||
..
|
||||
}) => HirDef::Local(self.tcx.hir().hir_to_node_id(canonical_id)),
|
||||
|
||||
Node::Ty(&hir::Ty { node: hir::TyKind::Path(ref qpath), .. } ) => {
|
||||
let hir_id = self.tcx.hir().node_to_hir_id(id);
|
||||
self.tables.qpath_def(qpath, hir_id)
|
||||
},
|
||||
|
||||
_ => HirDef::Err,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user