Describe the bug
If I am deriving both TryFromJs and TryIntoJs, I can't use #[boa(from_js_with = "...")] or #[boa(into_js_with = "...")] as each macro complains about the other's annotation.
To Reproduce
This example code:
#[derive(TryFromJs, TryIntoJs)]
struct Blah {
#[boa(into_js_with = "my_custom_converter_to_js")]
#[boa(from_js_with = "my_custom_converter_from_js")]
x: i32,
}
Results in two error messages:
invalid syntax in the #[boa()] attribute. Note that this attribute only accepts the following syntax: #[boa(from_js_with = "fully::qualified::path")]
invalid syntax in the #[boa()] attribute. Note that this attribute only accepts the following syntax:
#[boa(into_js_with = "fully::qualified::path")]
#[boa(rename = "jsPropertyName")]
#[boa(skip)]
Expected behavior
I expected to be able to specify one or more custom conversion functions when deriving both TryIntoJs and TryFromJs on the same type.
Build environment:
- OS: MacOS
- Version: 15.7.3
- Target triple: aarch64-apple-darwin
- Rustc version: rustc 1.92.0 (ded5c06cf 2025-12-08)
Describe the bug
If I am deriving both
TryFromJsandTryIntoJs, I can't use#[boa(from_js_with = "...")]or#[boa(into_js_with = "...")]as each macro complains about the other's annotation.To Reproduce
This example code:
Results in two error messages:
Expected behavior
I expected to be able to specify one or more custom conversion functions when deriving both
TryIntoJsandTryFromJson the same type.Build environment: