Do not recurse into const generic args when resolving self lifetime elision.

This commit is contained in:
Camille GILLOT
2023-04-29 10:09:55 +00:00
parent 89158e210c
commit 8972a23f48
3 changed files with 55 additions and 0 deletions

View File

@@ -2075,6 +2075,10 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
}
visit::walk_ty(self, ty)
}
// A type may have an expression as a const generic argument.
// We do not want to recurse into those.
fn visit_expr(&mut self, _: &'a Expr) {}
}
let impl_self = self