Skip to content

Commit

Permalink
Let qpath contain NtTy: <$:ty as $:ty>::rest
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Nov 25, 2021
1 parent 558ddee commit 0cbb00f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions compiler/rustc_parse/src/parser/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,16 @@ impl<'a> Parser<'a> {
path
});

if let token::Interpolated(nt) = &self.token.kind {
if let token::NtTy(ty) = &**nt {
if let ast::TyKind::Path(None, path) = &ty.kind {
let path = path.clone();
self.bump();
return Ok(path);
}
}
}

let lo = self.token.span;
let mut segments = Vec::new();
let mod_sep_ctxt = self.token.span.ctxt();
Expand Down

0 comments on commit 0cbb00f

Please sign in to comment.