about summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-04-04 20:23:52 -0400
committerMichael Goulet <michael@errs.io>2024-04-15 16:45:26 -0400
commit52c6b101ea18ed6f09367bf459ac55ffe473cd9c (patch)
tree4bd7b7084b701a4c3e9deb299db09c209b5a7dbc /compiler/rustc_ast_lowering/src
parentce8961039e244b1e4e0fa02fc10d59a22abc9ea3 (diff)
downloadrust-52c6b101ea18ed6f09367bf459ac55ffe473cd9c.tar.gz
rust-52c6b101ea18ed6f09367bf459ac55ffe473cd9c.zip
Use a path instead of an ident (and stop manually resolving)
Diffstat (limited to 'compiler/rustc_ast_lowering/src')
-rw-r--r--compiler/rustc_ast_lowering/src/lib.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs
index 84776f920c4..a21d6019cf1 100644
--- a/compiler/rustc_ast_lowering/src/lib.rs
+++ b/compiler/rustc_ast_lowering/src/lib.rs
@@ -1790,13 +1790,16 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
             PreciseCapturingArg::Lifetime(lt) => {
                 hir::PreciseCapturingArg::Lifetime(self.lower_lifetime(lt))
             }
-            PreciseCapturingArg::Arg(ident, node_id) => {
-                let res = self.resolver.get_partial_res(*node_id).map_or(Res::Err, |partial_res| {
+            PreciseCapturingArg::Arg(path, id) => {
+                let [segment] = path.segments.as_slice() else {
+                    panic!();
+                };
+                let res = self.resolver.get_partial_res(*id).map_or(Res::Err, |partial_res| {
                     partial_res.full_res().expect("no partial res expected for precise capture arg")
                 });
                 hir::PreciseCapturingArg::Param(hir::PreciseCapturingNonLifetimeArg {
-                    hir_id: self.lower_node_id(*node_id),
-                    ident: self.lower_ident(*ident),
+                    hir_id: self.lower_node_id(*id),
+                    ident: self.lower_ident(segment.ident),
                     res: self.lower_res(res),
                 })
             }