Code
#![feature(derive_coerce_pointee)]
use std::marker::CoercePointee;
use std::rc::Rc;
#[repr(transparent)]
#[derive(CoercePointee)]
struct RcWithId<T: ?Sized> {
inner: Rc<(i32, Box<T>)>,
}
Current output
error[E0277]: the trait bound `Box<T>: Unsize<Box<__S>>` is not satisfied
--> src/main.rs:6:10
|
6 | #[derive(CoercePointee)]
| ^^^^^^^^^^^^^ the trait `Unsize<Box<__S>>` is not implemented for `Box<T>`
|
= note: all implementations of `Unsize` are provided automatically by the compiler, see <https://doc.rust-lang.org/stable/std/marker/trait.Unsize.html> for more information
= note: required for `Rc<(i32, Box<T>)>` to implement `DispatchFromDyn<Rc<(i32, Box<__S>)>>`
= note: this error originates in the derive macro `CoercePointee` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Box<T>: Unsize<Box<__S>>` is not satisfied
--> src/main.rs:6:10
|
6 | #[derive(CoercePointee)]
| ^^^^^^^^^^^^^ the trait `Unsize<Box<__S>>` is not implemented for `Box<T>`
|
= note: all implementations of `Unsize` are provided automatically by the compiler, see <https://doc.rust-lang.org/stable/std/marker/trait.Unsize.html> for more information
= note: this error originates in the derive macro `CoercePointee` (in Nightly builds, run with -Z macro-backtrace for more info)
Desired output
Something that does not mention internal things like `Unsize` or `__S`
Rationale and extra context
No response
Other cases
Rust Version
Anything else?
No response
Code
Current output
Desired output
Rationale and extra context
No response
Other cases
Rust Version
Anything else?
No response