Avoid deprecated constructor

This commit is contained in:
Alex Crichton
2018-05-29 18:01:40 -07:00
parent 5e94dc2b75
commit 6d23c8533b
2 changed files with 2 additions and 2 deletions

View File

@ -20,5 +20,5 @@ xxx_debug_only_print_generated_code = []
[dependencies]
syn = { version = '0.14', features = ['full'] }
quote = '0.6'
proc-macro2 = "0.4"
proc-macro2 = "0.4.4"
wasm-bindgen-backend = { path = "../backend", version = "=0.2.11" }

View File

@ -15,7 +15,7 @@ pub fn wasm_bindgen(attr: TokenStream, input: TokenStream) -> TokenStream {
let opts = syn::parse::<backend::ast::BindgenAttrs>(attr)
.expect("invalid arguments to #[wasm_bindgen]");
let mut ret = proc_macro2::TokenStream::empty();
let mut ret = proc_macro2::TokenStream::new();
let mut program = backend::ast::Program::default();
program.push_item(item, Some(opts), &mut ret);
program.to_tokens(&mut ret);