diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-09-12 19:03:42 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-12 19:03:42 +0200 |
| commit | b0ff0b7bf96b460d71d9be4ad3beb25c490ec27c (patch) | |
| tree | db6e12adedb709d7aab018a6a8a38d16e768486d /compiler/rustc_resolve/src/late/diagnostics.rs | |
| parent | 4428d6f36306b2d17ad7eb11bd0bbc553800578b (diff) | |
| parent | d4fc76cbf386eeeb184bf0411af670912e9bc70d (diff) | |
| download | rust-b0ff0b7bf96b460d71d9be4ad3beb25c490ec27c.tar.gz rust-b0ff0b7bf96b460d71d9be4ad3beb25c490ec27c.zip | |
Rollup merge of #130208 - nnethercote:rslv-lifetime, r=petrochenkov
Introduce `'ra` lifetime name. `rustc_resolve` allocates many things in `ResolverArenas`. The lifetime used for references into the arena is mostly `'a`, and sometimes `'b`. This commit changes it to `'rslv`, which is much more descriptive. The commit also changes the order of lifetimes on a couple of structs so that '`rslv` is second last, before `'tcx`, and does other minor renamings such as `'r` to `'a`. r? ``@petrochenkov`` cc ``@oli-obk``
Diffstat (limited to 'compiler/rustc_resolve/src/late/diagnostics.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/late/diagnostics.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs index 202c0e5f9c5..1c584bf8338 100644 --- a/compiler/rustc_resolve/src/late/diagnostics.rs +++ b/compiler/rustc_resolve/src/late/diagnostics.rs @@ -170,7 +170,7 @@ impl TypoCandidate { } } -impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> { +impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> { fn make_base_error( &mut self, path: &[Segment], @@ -2277,7 +2277,7 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> { false } - fn find_module(&mut self, def_id: DefId) -> Option<(Module<'a>, ImportSuggestion)> { + fn find_module(&mut self, def_id: DefId) -> Option<(Module<'ra>, ImportSuggestion)> { let mut result = None; let mut seen_modules = FxHashSet::default(); let root_did = self.r.graph_root.def_id(); |
