1
Fork 0

Use a path instead of an ident (and stop manually resolving)

This commit is contained in:
Michael Goulet 2024-04-04 20:23:52 -04:00
parent ce8961039e
commit 52c6b101ea
12 changed files with 81 additions and 84 deletions

View file

@ -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 {