Skip to content

Commit 24a41c1

Browse files
committed
Cleanup in preparation of generic extraction
1 parent 8b54259 commit 24a41c1

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
@@ -1320,8 +1320,9 @@ impl<'a> LoweringContext<'a> {
13201320
}
13211321

13221322
fn visit_ty(&mut self, t: &'v hir::Ty) {
1323+
match t.node {
13231324
// Don't collect elided lifetimes used inside of `fn()` syntax
1324-
if let &hir::Ty_::TyBareFn(_) = &t.node {
1325+
hir::Ty_::TyBareFn(_) => {
13251326
let old_collect_elided_lifetimes = self.collect_elided_lifetimes;
13261327
self.collect_elided_lifetimes = false;
13271328

@@ -1332,8 +1333,8 @@ impl<'a> LoweringContext<'a> {
13321333
self.currently_bound_lifetimes.truncate(old_len);
13331334

13341335
self.collect_elided_lifetimes = old_collect_elided_lifetimes;
1335-
} else {
1336-
hir::intravisit::walk_ty(self, t);
1336+
},
1337+
_ => hir::intravisit::walk_ty(self, t),
13371338
}
13381339
}
13391340

0 commit comments

Comments
 (0)