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
error[E0271]: type mismatch resolving `<Task as ExternType>::Kind == Trivial`
--> src/tc/src/replica.rs:11:14
|
11 | type Task = crate::task::Task;
| ^^^^ type mismatch resolving `<Task as ExternType>::Kind == Trivial`
|
note: expected this to be `Trivial`
--> src/tc/src/task.rs:14:17
|
14 | type Kind = cxx::kind::Opaque;
| ^^^^^^^^^^^^^^^^^
note: required by a bound in `verify_extern_kind`
--> /home/dustin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cxx-1.0.119/src/extern_type.rs:187:41
|
187 | pub fn verify_extern_kind<T: ExternType<Kind = Kind>, Kind: self::Kind>() {}
| ^^^^^^^^^^^ required by this bound in `verify_extern_kind`
Changing the type to Trivial in the ExternType impl results in
/home/dustin/p/taskwarrior/build/src/tc/corrosion_generated/cxxbridge/taskchampion-cpp/src/replica.cpp:457:40: error: static assertion failed: type tc::Task should be trivially move constructible and trivially destructible in C++ to be used as type Box<Task> in Rust
457 | ::rust::IsRelocatable<::tc::Task>::value,
Everything works with Opaque if I take &Task instead of Box<Task>, which would be fine except I need to return an (owned) Task.
The text was updated successfully, but these errors were encountered:
I tried the trick in #942 to use an opaque type in multiple Rust modules no longer works.
This results in
Changing the type to
Trivial
in theExternType
impl results inEverything works with Opaque if I take
&Task
instead ofBox<Task>
, which would be fine except I need to return an (owned) Task.The text was updated successfully, but these errors were encountered: