Skip to content

Commit a1f6a61

Browse files
committed
Undo if let -> match conversion
1 parent eb9043b commit a1f6a61

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/librustc/hir/lowering.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -1352,9 +1352,8 @@ impl<'a> LoweringContext<'a> {
13521352
}
13531353

13541354
fn visit_ty(&mut self, t: &'v hir::Ty) {
1355-
match t.node {
13561355
// Don't collect elided lifetimes used inside of `fn()` syntax
1357-
hir::Ty_::TyBareFn(_) => {
1356+
if let hir::Ty_::TyBareFn(_) = t.node {
13581357
let old_collect_elided_lifetimes = self.collect_elided_lifetimes;
13591358
self.collect_elided_lifetimes = false;
13601359

@@ -1365,8 +1364,8 @@ impl<'a> LoweringContext<'a> {
13651364
self.currently_bound_lifetimes.truncate(old_len);
13661365

13671366
self.collect_elided_lifetimes = old_collect_elided_lifetimes;
1368-
},
1369-
_ => hir::intravisit::walk_ty(self, t),
1367+
} else {
1368+
hir::intravisit::walk_ty(self, t)
13701369
}
13711370
}
13721371

0 commit comments

Comments
 (0)