1
Fork 0

Parsing , pre-lowering support for precise captures

This commit is contained in:
Michael Goulet 2024-04-03 19:58:50 -04:00
parent 99d0186b1d
commit a076eae0d2
15 changed files with 41 additions and 15 deletions

View file

@ -793,7 +793,7 @@ impl<'a: 'ast, 'ast, 'tcx> Visitor<'ast> for LateResolutionVisitor<'a, '_, 'ast,
self.r.record_partial_res(ty.id, PartialRes::new(res));
visit::walk_ty(self, ty)
}
TyKind::ImplTrait(node_id, _) => {
TyKind::ImplTrait(node_id, _, _) => {
let candidates = self.lifetime_elision_candidates.take();
visit::walk_ty(self, ty);
self.record_lifetime_params_for_impl_trait(*node_id);

View file

@ -3121,7 +3121,7 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> {
.inputs
.iter()
.filter_map(|param| match &param.ty.kind {
TyKind::ImplTrait(_, bounds) => Some(bounds),
TyKind::ImplTrait(_, bounds, _) => Some(bounds),
_ => None,
})
.flat_map(|bounds| bounds.into_iter())