about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src/late/diagnostics.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-09-12 19:03:42 +0200
committerGitHub <noreply@github.com>2024-09-12 19:03:42 +0200
commitb0ff0b7bf96b460d71d9be4ad3beb25c490ec27c (patch)
treedb6e12adedb709d7aab018a6a8a38d16e768486d /compiler/rustc_resolve/src/late/diagnostics.rs
parent4428d6f36306b2d17ad7eb11bd0bbc553800578b (diff)
parentd4fc76cbf386eeeb184bf0411af670912e9bc70d (diff)
downloadrust-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.rs4
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();