diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-04-29 10:09:55 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2023-05-03 18:07:53 +0000 |
| commit | 8972a23f4827e784a9dc2f14435d2bc34197c74b (patch) | |
| tree | c583a4624edde3a2346ce14c4e197577b382f845 /compiler/rustc_resolve/src | |
| parent | 89158e210ce0b9550b42c65ede244087f2e144b5 (diff) | |
| download | rust-8972a23f4827e784a9dc2f14435d2bc34197c74b.tar.gz rust-8972a23f4827e784a9dc2f14435d2bc34197c74b.zip | |
Do not recurse into const generic args when resolving self lifetime elision.
Diffstat (limited to 'compiler/rustc_resolve/src')
| -rw-r--r-- | compiler/rustc_resolve/src/late.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index 511ae8516a8..b783acc8607 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -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 |
