Skip to content

Commit bdcace0

Browse files
committed
Cleanup in preparation of generic extraction
1 parent 612c280 commit bdcace0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/librustc/hir/lowering.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,8 +1364,9 @@ impl<'a> LoweringContext<'a> {
13641364
}
13651365

13661366
fn visit_ty(&mut self, t: &'v hir::Ty) {
1367+
match t.node {
13671368
// Don't collect elided lifetimes used inside of `fn()` syntax
1368-
if let &hir::Ty_::TyBareFn(_) = &t.node {
1369+
hir::Ty_::TyBareFn(_) => {
13691370
let old_collect_elided_lifetimes = self.collect_elided_lifetimes;
13701371
self.collect_elided_lifetimes = false;
13711372

@@ -1376,8 +1377,8 @@ impl<'a> LoweringContext<'a> {
13761377
self.currently_bound_lifetimes.truncate(old_len);
13771378

13781379
self.collect_elided_lifetimes = old_collect_elided_lifetimes;
1379-
} else {
1380-
hir::intravisit::walk_ty(self, t);
1380+
},
1381+
_ => hir::intravisit::walk_ty(self, t),
13811382
}
13821383
}
13831384

0 commit comments

Comments
 (0)