diff --git a/macros/src/derive_form.rs b/macros/src/derive_form.rs index 149e1cbc..f43fcdde 100644 --- a/macros/src/derive_form.rs +++ b/macros/src/derive_form.rs @@ -89,6 +89,7 @@ pub fn from_form_derive(ecx: &mut ExtCtxt, span: Span, meta_item: &MetaItem, attributes: vec![], is_unsafe: false, combine_substructure: c_s(Box::new(from_form_substructure)), + unify_fieldless_variants: false, } ], associated_types: vec![], @@ -214,6 +215,6 @@ fn from_form_substructure(cx: &mut ExtCtxt, trait_span: Span, substr: &Substruct }); stmts.extend(final_block.unwrap().stmts); - cx.expr_block(cx.block(trait_span, stmts, None)) + cx.expr_block(cx.block(trait_span, stmts)) } diff --git a/macros/src/errors_macro.rs b/macros/src/errors_macro.rs index 433690f8..455bfb4b 100644 --- a/macros/src/errors_macro.rs +++ b/macros/src/errors_macro.rs @@ -1,7 +1,8 @@ use super::{CATCH_STRUCT_PREFIX}; use utils::*; use syntax::codemap::Span; -use syntax::ast::{TokenTree, Expr}; +use syntax::tokenstream::TokenTree; +use syntax::ast::Expr; use syntax::ext::base::{ExtCtxt, MacResult, MacEager}; use syntax::parse::token::Token; use syntax::ptr::P; diff --git a/macros/src/route_decorator.rs b/macros/src/route_decorator.rs index d4303ad8..c1bdd1a3 100644 --- a/macros/src/route_decorator.rs +++ b/macros/src/route_decorator.rs @@ -6,11 +6,11 @@ use std::collections::HashSet; use syntax::ext::quote::rt::ToTokens; use syntax::codemap::{Span, BytePos, /* DUMMY_SP, */ Spanned}; -use syntax::ast::{Ident, TokenTree, PatKind, Stmt}; +use syntax::tokenstream::TokenTree; +use syntax::ast::{Ident, PatKind, Stmt}; use syntax::ast::{Item, Expr, ItemKind, MetaItem, MetaItemKind, FnDecl, Ty}; use syntax::ext::base::{Annotatable, ExtCtxt}; use syntax::ptr::P; -use syntax::ext::build::AstBuilder; use syntax::print::pprust::{item_to_string, stmt_to_string}; use syntax::parse::token::{self, str_to_ident}; diff --git a/macros/src/routes_macro.rs b/macros/src/routes_macro.rs index 47018d3c..ad74b1aa 100644 --- a/macros/src/routes_macro.rs +++ b/macros/src/routes_macro.rs @@ -1,7 +1,8 @@ use super::{ROUTE_STRUCT_PREFIX}; use utils::*; use syntax::codemap::Span; -use syntax::ast::{TokenTree, Expr}; +use syntax::tokenstream::TokenTree; +use syntax::ast::Expr; use syntax::ext::base::{ExtCtxt, MacResult, MacEager}; use syntax::parse::token::Token; use syntax::ptr::P; diff --git a/macros/src/utils.rs b/macros/src/utils.rs index ba516929..5e349306 100644 --- a/macros/src/utils.rs +++ b/macros/src/utils.rs @@ -1,11 +1,12 @@ use syntax::parse::{token}; use syntax::parse::token::Token; -use syntax::ast::{Path, Ident, MetaItem, MetaItemKind, LitKind, TokenTree}; +use syntax::tokenstream::TokenTree; +use syntax::ast::{Path, Ident, MetaItem, MetaItemKind, LitKind}; use syntax::ext::base::{ExtCtxt}; use syntax::codemap::{Span, Spanned, BytePos, DUMMY_SP}; use syntax::ext::quote::rt::ToTokens; use syntax::parse::PResult; -use syntax::parse::parser::{PathParsingMode, Parser}; +use syntax::parse::parser::{PathStyle, Parser}; use syntax::ptr::P; use std::collections::{HashSet, HashMap}; @@ -178,7 +179,7 @@ pub fn parse_paths<'a>(parser: &mut Parser<'a>) -> PResult<'a, Vec> { let mut results = Vec::new(); loop { - results.push(try!(parser.parse_path(PathParsingMode::NoTypesAllowed))); + results.push(try!(parser.parse_path(PathStyle::Mod))); if !parser.eat(&Token::Comma) { try!(parser.expect(&Token::Eof)); break;