Do not execute captures code when lowering lifetimes as GenericArg

This commit is contained in:
Santiago Pastorino 2022-07-26 15:30:58 -03:00
parent 9c0d9babd1
commit 20c88a2a30
No known key found for this signature in database
GPG Key ID: 8131A24E0C79EFAF

View File

@ -1423,7 +1423,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|(_, (span, _, p_name, res))| { |(_, (span, _, p_name, res))| {
let id = self.next_node_id(); let id = self.next_node_id();
let ident = Ident::new(p_name.ident().name, span); let ident = Ident::new(p_name.ident().name, span);
let l = self.new_named_lifetime_with_res(id, span, ident, res, true); let l = self.new_named_lifetime_with_res(id, span, ident, res, false);
hir::GenericArg::Lifetime(l) hir::GenericArg::Lifetime(l)
}, },
)); ));