diff options
| author | Igor Matuszewski <Xanewok@gmail.com> | 2019-04-11 23:53:59 +0200 |
|---|---|---|
| committer | Igor Matuszewski <Xanewok@gmail.com> | 2019-04-11 23:53:59 +0200 |
| commit | bcd263e1f13494197503ec2f3eba554fe6055595 (patch) | |
| tree | cdf84f768b6bd89e987fe636c169ad81044be34b | |
| parent | 1ced262653bbd8dfbc44a69cc5039d6e4ae6f46b (diff) | |
| download | rust-bcd263e1f13494197503ec2f3eba554fe6055595.tar.gz rust-bcd263e1f13494197503ec2f3eba554fe6055595.zip | |
save-analysis: Simplify match arm for type node def
| -rw-r--r-- | src/librustc_save_analysis/lib.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/librustc_save_analysis/lib.rs b/src/librustc_save_analysis/lib.rs index 9b21e42bf38..d6923b4490d 100644 --- a/src/librustc_save_analysis/lib.rs +++ b/src/librustc_save_analysis/lib.rs @@ -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, } } |
