]> git.lizzy.rs Git - rust.git/commitdiff
Undo if let -> match conversion
authorOliver Schneider <github35764891676564198441@oli-obk.de>
Wed, 27 Jun 2018 09:24:16 +0000 (11:24 +0200)
committerOliver Schneider <github35764891676564198441@oli-obk.de>
Wed, 27 Jun 2018 09:24:16 +0000 (11:24 +0200)
src/librustc/hir/lowering.rs

index 8e49ed237145930608f89daf4d7c607c135e3d12..50fd8e01580557167f1c9649240ee96bc991816a 100644 (file)
@@ -1352,9 +1352,8 @@ fn visit_generic_args(&mut self, span: Span, parameters: &'v hir::GenericArgs) {
             }
 
             fn visit_ty(&mut self, t: &'v hir::Ty) {
-                match t.node {
                     // Don't collect elided lifetimes used inside of `fn()` syntax
-                    hir::Ty_::TyBareFn(_) => {
+                if let hir::Ty_::TyBareFn(_) = t.node {
                         let old_collect_elided_lifetimes = self.collect_elided_lifetimes;
                         self.collect_elided_lifetimes = false;
 
@@ -1365,8 +1364,8 @@ fn visit_ty(&mut self, t: &'v hir::Ty) {
                         self.currently_bound_lifetimes.truncate(old_len);
 
                         self.collect_elided_lifetimes = old_collect_elided_lifetimes;
-                    },
-                    _ => hir::intravisit::walk_ty(self, t),
+                } else {
+                    hir::intravisit::walk_ty(self, t)
                 }
             }