Attach TokenStream
to ast::Ty
A `Ty` does not have outer attributes, so we only capture tokens when parsing a `macro_rules!` matcher
This commit is contained in:
parent
de4bd9f0f8
commit
1823dea7df
12 changed files with 42 additions and 15 deletions
|
@ -28,7 +28,7 @@ pub(super) fn dummy_arg(ident: Ident) -> Param {
|
|||
span: ident.span,
|
||||
tokens: None,
|
||||
});
|
||||
let ty = Ty { kind: TyKind::Err, span: ident.span, id: ast::DUMMY_NODE_ID };
|
||||
let ty = Ty { kind: TyKind::Err, span: ident.span, id: ast::DUMMY_NODE_ID, tokens: None };
|
||||
Param {
|
||||
attrs: AttrVec::default(),
|
||||
id: ast::DUMMY_NODE_ID,
|
||||
|
@ -75,7 +75,12 @@ impl RecoverQPath for Ty {
|
|||
Some(P(self.clone()))
|
||||
}
|
||||
fn recovered(qself: Option<QSelf>, path: ast::Path) -> Self {
|
||||
Self { span: path.span, kind: TyKind::Path(qself, path), id: ast::DUMMY_NODE_ID }
|
||||
Self {
|
||||
span: path.span,
|
||||
kind: TyKind::Path(qself, path),
|
||||
id: ast::DUMMY_NODE_ID,
|
||||
tokens: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue