-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
I'm encountering a build error I can't figure out when attempting to upgrade from version 0.4.5 to version 0.5.5. I've managed to reproduce this issue in a minimal example.
I see no errors building this Rust file using tsify 0.4.5 as specified by the Cargo.toml
extern crate tsify;
#[derive(serde::Serialize, tsify::Tsify)]
#[tsify(into_wasm_abi)]
pub enum Enum<T = ()> {
Unit(std::marker::PhantomData<T>),
}
fn main() {}
[package]
name = "tsify-test"
version = "0.1.0"
edition = "2024"
[dependencies]
serde = {version = "1.0.219", features = ["serde_derive"]}
tsify = "0.4.5"
wasm-bindgen = "0.2.100"
If I update to tsify = "0.5.5"
, I now see a build error.
Updating crates.io index
Locking 4 packages to latest Rust 1.88.0 compatible versions
Updating gloo-utils v0.1.7 -> v0.2.0
Updating serde_derive_internals v0.28.0 -> v0.29.1
Updating tsify v0.4.5 -> v0.5.5
Updating tsify-macros v0.4.5 -> v0.5.5
Compiling tsify-test v0.1.0 (/Users/jkastner/tsify-test)
error[E0229]: associated item constraints are not allowed here
--> src/main.rs:5:15
|
5 | pub enum Enum<T = ()> {
| ^^^^^^ associated item constraint not allowed here
|
help: to use `()` as a generic argument specify it directly
|
5 - pub enum Enum<T = ()> {
5 + pub enum Enum<()> {
|
For more information about this error, try `rustc --explain E0229`.
error: could not compile `tsify-test` (bin "tsify-test") due to 4 previous errors
I have not been able to find a workaround for this, so we're staying on 0.4.5 for the moment.
For full context see this PR cedar-policy/cedar#1719 and the relevant enum in our repository.
Metadata
Metadata
Assignees
Labels
No labels