about summary refs log tree commit diff
path: root/compiler/rustc_parse/src
diff options
context:
space:
mode:
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 {