From 156ef2bee8f3941d4d7e3414652b803348ccd165 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Thu, 10 Sep 2020 16:59:30 -0400 Subject: Attach tokens to `ast::Stmt` We currently only attach tokens when parsing a `:stmt` matcher for a `macro_rules!` macro. Proc-macro attributes on statements are still unstable, and need additional work. --- compiler/rustc_interface/src/util.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compiler/rustc_interface') diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs index 01441cafe8a..f15eb413833 100644 --- a/compiler/rustc_interface/src/util.rs +++ b/compiler/rustc_interface/src/util.rs @@ -710,6 +710,7 @@ impl<'a> MutVisitor for ReplaceBodyWithLoop<'a, '_> { id: resolver.next_node_id(), kind: ast::StmtKind::Expr(expr), span: rustc_span::DUMMY_SP, + tokens: None, } } @@ -726,6 +727,7 @@ impl<'a> MutVisitor for ReplaceBodyWithLoop<'a, '_> { id: self.resolver.next_node_id(), span: rustc_span::DUMMY_SP, kind: ast::StmtKind::Expr(loop_expr), + tokens: None, }; if self.within_static_or_const { -- cgit 1.4.1-3-g733a5