summary refs log tree commit diff
path: root/src/libsyntax_ext
diff options
context:
space:
mode:
authorJeffrey Seyfried <jeffrey.seyfried@gmail.com>2016-06-17 02:30:01 +0000
committerJeffrey Seyfried <jeffrey.seyfried@gmail.com>2016-06-17 05:21:23 +0000
commit962d5c16b5bb8103785781e61e578ab5a784b1c4 (patch)
treee77e50c03e6c0921111f125752b24ac0c3e0344b /src/libsyntax_ext
parentb5dbe01a2c7e8ef55fe7a07103dad5c99ace199a (diff)
downloadrust-962d5c16b5bb8103785781e61e578ab5a784b1c4.tar.gz
rust-962d5c16b5bb8103785781e61e578ab5a784b1c4.zip
Fix fallout
Diffstat (limited to 'src/libsyntax_ext')
-rw-r--r--src/libsyntax_ext/deriving/debug.rs9
-rw-r--r--src/libsyntax_ext/format.rs12
2 files changed, 13 insertions, 8 deletions
diff --git a/src/libsyntax_ext/deriving/debug.rs b/src/libsyntax_ext/deriving/debug.rs
index d86eae820a8..a2d01d008b9 100644
--- a/src/libsyntax_ext/deriving/debug.rs
+++ b/src/libsyntax_ext/deriving/debug.rs
@@ -13,7 +13,7 @@ use deriving::generic::ty::*;
 
 use syntax::ast;
 use syntax::ast::{MetaItem, Expr};
-use syntax::codemap::{Span, respan, DUMMY_SP};
+use syntax::codemap::{Span, DUMMY_SP};
 use syntax::ext::base::{ExtCtxt, Annotatable};
 use syntax::ext::build::AstBuilder;
 use syntax::parse::token;
@@ -151,6 +151,9 @@ fn stmt_let_undescore(cx: &mut ExtCtxt,
         span: sp,
         attrs: None,
     });
-    let decl = respan(sp, ast::DeclKind::Local(local));
-    respan(sp, ast::StmtKind::Decl(P(decl), ast::DUMMY_NODE_ID))
+    ast::Stmt {
+        id: ast::DUMMY_NODE_ID,
+        node: ast::StmtKind::Local(local),
+        span: sp,
+    }
 }
diff --git a/src/libsyntax_ext/format.rs b/src/libsyntax_ext/format.rs
index abfa6558064..ca968f10e2e 100644
--- a/src/libsyntax_ext/format.rs
+++ b/src/libsyntax_ext/format.rs
@@ -14,7 +14,7 @@ use self::Position::*;
 use fmt_macros as parse;
 
 use syntax::ast;
-use syntax::codemap::{Span, respan, DUMMY_SP};
+use syntax::codemap::{Span, DUMMY_SP};
 use syntax::ext::base::*;
 use syntax::ext::base;
 use syntax::ext::build::AstBuilder;
@@ -441,12 +441,14 @@ impl<'a, 'b> Context<'a, 'b> {
 
         let name = ecx.ident_of(name);
         let item = ecx.item(sp, name, vec![], st);
-        let decl = respan(sp, ast::DeclKind::Item(item));
+        let stmt = ast::Stmt {
+            id: ast::DUMMY_NODE_ID,
+            node: ast::StmtKind::Item(item),
+            span: sp,
+        };
 
         // Wrap the declaration in a block so that it forms a single expression.
-        ecx.expr_block(ecx.block(sp,
-            vec![respan(sp, ast::StmtKind::Decl(P(decl), ast::DUMMY_NODE_ID))],
-            Some(ecx.expr_ident(sp, name))))
+        ecx.expr_block(ecx.block(sp, vec![stmt], Some(ecx.expr_ident(sp, name))))
     }
 
     /// Actually builds the expression which the iformat! block will be expanded