about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/util.rs
diff options
context:
space:
mode:
authorAaron Hill <aa1ronham@gmail.com>2020-09-10 16:59:30 -0400
committerAaron Hill <aa1ronham@gmail.com>2020-09-10 17:33:06 -0400
commit156ef2bee8f3941d4d7e3414652b803348ccd165 (patch)
tree31a9945d066ecafa5b22a893cf999fb77fef6181 /compiler/rustc_interface/src/util.rs
parentc1011165e63480dabf1913e308da8b344dfa8f8a (diff)
downloadrust-156ef2bee8f3941d4d7e3414652b803348ccd165.tar.gz
rust-156ef2bee8f3941d4d7e3414652b803348ccd165.zip
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.
Diffstat (limited to 'compiler/rustc_interface/src/util.rs')
-rw-r--r--compiler/rustc_interface/src/util.rs2
1 files changed, 2 insertions, 0 deletions
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 {