diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-05-04 19:18:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-04 19:18:20 +0200 |
| commit | 8d66f01ab50870c63f85c3c7395347e5b82caa88 (patch) | |
| tree | c4cd4051d628f4100a5b8ba60bdee476e7f26e97 /compiler/rustc_resolve/src | |
| parent | 0ac8ebdf11f7b288f3c62c12f97c57dd16f07808 (diff) | |
| parent | 8972a23f4827e784a9dc2f14435d2bc34197c74b (diff) | |
| download | rust-8d66f01ab50870c63f85c3c7395347e5b82caa88.tar.gz rust-8d66f01ab50870c63f85c3c7395347e5b82caa88.zip | |
Rollup merge of #110982 - cjgillot:elided-self-const, r=petrochenkov
Do not recurse into const generic args when resolving self lifetime elision. Fixes https://github.com/rust-lang/rust/issues/110899 r? `@petrochenkov`
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 f876b8c7ae0..6f5d54bcf87 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -2070,6 +2070,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 |
