Update codegen for latest nightly.

This commit is contained in:
Sergio Benitez 2018-05-29 15:44:49 +02:00
parent 59d4f3d3b6
commit 39fa201c4a
2 changed files with 3 additions and 2 deletions

View File

@ -3,7 +3,7 @@ use std::fmt::Display;
use syntax::codemap::Span;
use syntax::ext::base::{DummyResult, ExtCtxt, MacEager, MacResult};
use syntax::tokenstream::{TokenStream, TokenTree};
use syntax::ast::{self, Ident};
use syntax::ast::{self, MacDelimiter, Ident};
use syntax::symbol::Symbol;
use syntax::parse::PResult;
use syntax::ext::build::AstBuilder;
@ -29,6 +29,7 @@ pub fn uri(
let expr = parser.mk_mac_expr(sp,
ast::Mac_ {
path: path,
delim: MacDelimiter::Parenthesis,
tts: args.to_vec().into_iter().collect::<TokenStream>().into(),
},
::syntax::util::ThinVec::new(),

View File

@ -98,6 +98,6 @@ fn real_derive_from_form_value(input: TokenStream) -> PResult<TokenStream> {
pub fn derive_from_form_value(input: TokenStream) -> TokenStream {
real_derive_from_form_value(input).unwrap_or_else(|diag| {
diag.emit();
TokenStream::empty()
TokenStream::new()
})
}