1
Fork 0

Fix fallout

This commit is contained in:
Jeffrey Seyfried 2016-06-17 02:30:01 +00:00
parent b5dbe01a2c
commit 962d5c16b5
21 changed files with 308 additions and 385 deletions

View file

@ -508,7 +508,11 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
}
fn stmt_expr(&self, expr: P<ast::Expr>) -> ast::Stmt {
respan(expr.span, ast::StmtKind::Semi(expr, ast::DUMMY_NODE_ID))
ast::Stmt {
id: ast::DUMMY_NODE_ID,
span: expr.span,
node: ast::StmtKind::Semi(expr),
}
}
fn stmt_let(&self, sp: Span, mutbl: bool, ident: ast::Ident,
@ -527,8 +531,11 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
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,
}
}
fn stmt_let_typed(&self,
@ -552,8 +559,11 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
span: sp,
attrs: None,
});
let decl = respan(sp, ast::DeclKind::Local(local));
P(respan(sp, ast::StmtKind::Decl(P(decl), ast::DUMMY_NODE_ID)))
P(ast::Stmt {
id: ast::DUMMY_NODE_ID,
node: ast::StmtKind::Local(local),
span: sp,
})
}
fn block(&self, span: Span, stmts: Vec<ast::Stmt>,
@ -562,8 +572,11 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
}
fn stmt_item(&self, sp: Span, item: P<ast::Item>) -> ast::Stmt {
let decl = respan(sp, ast::DeclKind::Item(item));
respan(sp, ast::StmtKind::Decl(P(decl), ast::DUMMY_NODE_ID))
ast::Stmt {
id: ast::DUMMY_NODE_ID,
node: ast::StmtKind::Item(item),
span: sp,
}
}
fn block_expr(&self, expr: P<ast::Expr>) -> P<ast::Block> {