about summary refs log tree commit diff
path: root/compiler/rustc_parse/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_parse/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_parse/src')
-rw-r--r--compiler/rustc_parse/src/parser/ty.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/ty.rs b/compiler/rustc_parse/src/parser/ty.rs
index 91f4823f65d..f78a039394b 100644
--- a/compiler/rustc_parse/src/parser/ty.rs
+++ b/compiler/rustc_parse/src/parser/ty.rs
@@ -697,11 +697,14 @@ impl<'a> Parser<'a> {
                     if self_.check_keyword(kw::SelfUpper) {
                         self_.bump();
                         Ok(PreciseCapturingArg::Arg(
-                            self_.prev_token.ident().unwrap().0,
+                            ast::Path::from_ident(self_.prev_token.ident().unwrap().0),
                             DUMMY_NODE_ID,
                         ))
                     } else if self_.check_ident() {
-                        Ok(PreciseCapturingArg::Arg(self_.parse_ident().unwrap(), DUMMY_NODE_ID))
+                        Ok(PreciseCapturingArg::Arg(
+                            ast::Path::from_ident(self_.parse_ident()?),
+                            DUMMY_NODE_ID,
+                        ))
                     } else if self_.check_lifetime() {
                         Ok(PreciseCapturingArg::Lifetime(self_.expect_lifetime()))
                     } else {