Skip to content

Commit 0cbb00f

Browse files
committed
Let qpath contain NtTy: <$:ty as $:ty>::rest
1 parent 558ddee commit 0cbb00f

File tree

1 file changed

+10
-0
lines changed
  • compiler/rustc_parse/src/parser

1 file changed

+10
-0
lines changed

compiler/rustc_parse/src/parser/path.rs

+10
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,16 @@ impl<'a> Parser<'a> {
155155
path
156156
});
157157

158+
if let token::Interpolated(nt) = &self.token.kind {
159+
if let token::NtTy(ty) = &**nt {
160+
if let ast::TyKind::Path(None, path) = &ty.kind {
161+
let path = path.clone();
162+
self.bump();
163+
return Ok(path);
164+
}
165+
}
166+
}
167+
158168
let lo = self.token.span;
159169
let mut segments = Vec::new();
160170
let mod_sep_ctxt = self.token.span.ctxt();

0 commit comments

Comments
 (0)