help wanted
描述
The following worked prior to 1.0:
type DataSourcePrivate = Rc<DataSource>;
#[cxx::bridge(namespace = "mcrtlib::ffi")]
mod types {
pub struct DataSource {
pub inner: Box<DataSourcePrivate>,
}
extern "Rust" {
type DataSourcePrivate;
// ...
}
}
However, now I just get a
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> library/src/ffi.rs:85:9
|
85 | type DataSourcePrivate;
| ^^^^^-----------------
| | |
| | `Rc` is not defined in the current crate
| impl doesn't use only types from inside the current crate
|
= note: define and implement a trait or new type instead
Is it possible to make this work again or should I wrap my Rc in a tuple struct?