about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/librustc/hir/lowering.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/librustc/hir/lowering.rs b/src/librustc/hir/lowering.rs
index 110ebf6b215..3350b046c97 100644
--- a/src/librustc/hir/lowering.rs
+++ b/src/librustc/hir/lowering.rs
@@ -1364,8 +1364,9 @@ impl<'a> LoweringContext<'a> {
             }
 
             fn visit_ty(&mut self, t: &'v hir::Ty) {
+                match t.node {
                 // Don't collect elided lifetimes used inside of `fn()` syntax
-                if let &hir::Ty_::TyBareFn(_) = &t.node {
+                    hir::Ty_::TyBareFn(_) => {
                     let old_collect_elided_lifetimes = self.collect_elided_lifetimes;
                     self.collect_elided_lifetimes = false;
 
@@ -1376,8 +1377,8 @@ impl<'a> LoweringContext<'a> {
                     self.currently_bound_lifetimes.truncate(old_len);
 
                     self.collect_elided_lifetimes = old_collect_elided_lifetimes;
-                } else {
-                    hir::intravisit::walk_ty(self, t);
+                    },
+                    _ => hir::intravisit::walk_ty(self, t),
                 }
             }