Let qpath contain NtTy: <$:ty as $:ty>::rest

This commit is contained in:
David Tolnay 2021-11-22 19:43:51 -08:00
parent 558ddee2ce
commit 0cbb00f898
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -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();