Cleanup in preparation of generic extraction

This commit is contained in:
Oliver Schneider 2018-06-18 13:44:36 +02:00
parent 612c28004c
commit bdcace0eb4

View file

@ -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),
}
}