mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-17 06:51:24 +00:00
Forward attributes on type
declaration to definition
This'll allow things like `#[derive(Clone)]` or `#[derive(Debug)]` to control traits for these types.
This commit is contained in:
@ -505,8 +505,10 @@ impl ToTokens for ast::ImportType {
|
||||
fn to_tokens(&self, tokens: &mut TokenStream) {
|
||||
let vis = &self.vis;
|
||||
let name = &self.name;
|
||||
let attrs = &self.attrs;
|
||||
(quote! {
|
||||
#[allow(bad_style)]
|
||||
#(#attrs)*
|
||||
#vis struct #name {
|
||||
obj: ::wasm_bindgen::JsValue,
|
||||
}
|
||||
|
Reference in New Issue
Block a user