You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a structure TestStruct, When I take its reference as a parameter of an export function, it's OK, but once I put this export function in the macro, I will get the following error:
error[E0277]: the trait bound `&TestStruct:FromWasmAbi` is not satisfied
--> src\style.rs:49:9
|
49 | #[wasm_bindgen]
| ^^^^^^^^^^^^^^^ the trait `FromWasmAbi` is not implemented for `&TestStruct`
...
55 | my_out_export!(&TestStruct);
| --------------------------- in this macro invocation
`syn` wraps argument types in a `syn::TypeGroup` for free
functions/methods generated from `macro_rules!` this means that
references end up generating wrong code during proc macro expansion.
This PR unwraps argument types in `syn::TypeGroup` and matches against
the inner element for such cases.
Fixesrustwasm#3078
Signed-off-by: Oliver T <geronimooliver00@gmail.com>
I have a structure
TestStruct
, When I take its reference as a parameter of an export function, it's OK, but once I put this export function in the macro, I will get the following error:The Code:
The text was updated successfully, but these errors were encountered: