Skip to content

Commit

Permalink
Fix multiplle params in class attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
fl0rek committed Dec 11, 2024
1 parent 71a9eca commit d84f3d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions crates/macro-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,14 @@ pub fn expand(attr: TokenStream, input: TokenStream) -> Result<TokenStream, Diag
},
);
if !attr.is_empty() {
let meta: syn::Meta = syn::parse2(attr)?;
s.attrs.insert(
1,
syn::Attribute {
pound_token: Default::default(),
style: syn::AttrStyle::Outer,
bracket_token: Default::default(),
meta: syn::parse_quote! {
wasm_bindgen(#meta)
wasm_bindgen(#attr)
},
},
);
Expand Down
2 changes: 1 addition & 1 deletion tests/wasm/classes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ fn renamed_field() {
js_renamed_field();
}

#[cfg_attr(target_arch = "wasm32", wasm_bindgen)]
#[cfg_attr(target_arch = "wasm32", wasm_bindgen(inspectable, js_name = "ConditionalSkipClass"))]
pub struct ConditionalSkip {
#[cfg_attr(target_arch = "wasm32", wasm_bindgen(skip))]
pub skipped_field: [u8; 8],
Expand Down

0 comments on commit d84f3d8

Please sign in to comment.