mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-18 07:21:24 +00:00
Avoid deprecated constructor
This commit is contained in:
@ -20,5 +20,5 @@ xxx_debug_only_print_generated_code = []
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
syn = { version = '0.14', features = ['full'] }
|
syn = { version = '0.14', features = ['full'] }
|
||||||
quote = '0.6'
|
quote = '0.6'
|
||||||
proc-macro2 = "0.4"
|
proc-macro2 = "0.4.4"
|
||||||
wasm-bindgen-backend = { path = "../backend", version = "=0.2.11" }
|
wasm-bindgen-backend = { path = "../backend", version = "=0.2.11" }
|
||||||
|
@ -15,7 +15,7 @@ pub fn wasm_bindgen(attr: TokenStream, input: TokenStream) -> TokenStream {
|
|||||||
let opts = syn::parse::<backend::ast::BindgenAttrs>(attr)
|
let opts = syn::parse::<backend::ast::BindgenAttrs>(attr)
|
||||||
.expect("invalid arguments to #[wasm_bindgen]");
|
.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();
|
let mut program = backend::ast::Program::default();
|
||||||
program.push_item(item, Some(opts), &mut ret);
|
program.push_item(item, Some(opts), &mut ret);
|
||||||
program.to_tokens(&mut ret);
|
program.to_tokens(&mut ret);
|
||||||
|
Reference in New Issue
Block a user