Skip to content

Commit bcd263e

Browse files
committed
save-analysis: Simplify match arm for type node def
1 parent 1ced262 commit bcd263e

File tree

1 file changed

+4
-5
lines changed
  • src/librustc_save_analysis

1 file changed

+4
-5
lines changed

src/librustc_save_analysis/lib.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,10 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
647647
Node::Pat(&hir::Pat {
648648
node: hir::PatKind::TupleStruct(ref qpath, ..),
649649
..
650+
}) |
651+
Node::Ty(&hir::Ty {
652+
node: hir::TyKind::Path(ref qpath),
653+
..
650654
}) => {
651655
let hir_id = self.tcx.hir().node_to_hir_id(id);
652656
self.tables.qpath_def(qpath, hir_id)
@@ -657,11 +661,6 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
657661
..
658662
}) => HirDef::Local(self.tcx.hir().hir_to_node_id(canonical_id)),
659663

660-
Node::Ty(&hir::Ty { node: hir::TyKind::Path(ref qpath), .. } ) => {
661-
let hir_id = self.tcx.hir().node_to_hir_id(id);
662-
self.tables.qpath_def(qpath, hir_id)
663-
},
664-
665664
_ => HirDef::Err,
666665
}
667666
}

0 commit comments

Comments
 (0)