sval-rs / value-bag

Dynamic structured values for Rust
Apache License 2.0
27 stars 3 forks source link

v1.0.0-alpha.9: error: could not compile `value-bag` (lib) due to 4 previous errors #64

Closed lcmgh closed 1 year ago

lcmgh commented 1 year ago
cargo +nightly tarpaulin --features test --release --out Lcov --timeout 600"
error: could not compile `value-bag` (lib) due to 4 previous errors
May 30 08:41:33.078 ERROR cargo_tarpaulin: Failed to compile tests!
error: to use a constant of type `TypeId` in a pattern, `TypeId` must be annotated with `#[derive(PartialEq, Eq)]`
  --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/value-bag-1.0.0-alpha.9/src/internal/cast/primitive.rs:43:33
   |
43 |                                   $const_ident => |v| Some(Internal::from(unsafe { &*(*v as *const Self as *const $ty) })),
   |                                   ^^^^^^^^^^^^
...
71 | /         to_internal![
72 | |             usize: (USIZE, OPTION_USIZE),
73 | |             u8: (U8, OPTION_U8),
74 | |             u16: (U16, OPTION_U16),
...  |
96 | |             String: (STRING, OPTION_STRING),
97 | |         ];
   | |_________- in this macro invocation
   |
   = note: the traits must be derived, manual `impl`s are not sufficient
   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
   = note: this error originates in the macro `to_internal` (in Nightly builds, run with -Z macro-backtrace for more info)

Error: "Failed to compile tests!\nerror: to use a constant of type `TypeId` in a pattern, `TypeId` must be annotated with `#[derive(PartialEq, Eq)]`\n  --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/value-bag-1.0.0-alpha.9/src/internal/cast/primitive.rs:43:33\n   |\n43 |                                   $const_ident => |v| Some(Internal::from(unsafe { &*(*v as *const Self as *const $ty) })),\n   |                                   ^^^^^^^^^^^^\n...\n71 | /         to_internal![\n72 | |             usize: (USIZE, OPTION_USIZE),\n73 | |             u8: (U8, OPTION_U8),\n74 | |             u16: (U16, OPTION_U16),\n...  |\n96 | |             String: (STRING, OPTION_STRING),\n97 | |         ];\n   | |_________- in this macro invocation\n   |\n   = note: the traits must be derived, manual `impl`s are not sufficient\n   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details\n   = note: this error originates in the macro `to_internal` (in Nightly builds, run with -Z macro-backtrace for more info)\n\n"
Error: Process completed with exit code 1.
KodrAus commented 1 year ago

Hi @lcmgh 👋

There’s a stable release of this library now that builds on nightly.

If this is a compilation issue in your project, you can try running cargo update. Chances are you’re depending on this transitively via the log crate.

If you are using it directly then I’d be happy to lend a hand upgrading if needed.

lcmgh commented 1 year ago

Great cargo update helped :) thx