Updated for latest Rust nightly.

This commit is contained in:
Sergio Benitez 2016-07-06 17:09:22 -07:00
parent 9db5f5811f
commit 5870c2fe92
5 changed files with 12 additions and 8 deletions

View File

@ -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))
}

View File

@ -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;

View File

@ -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};

View File

@ -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;

View File

@ -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<Path>> {
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;