- Notifications
You must be signed in to change notification settings - Fork 14.1k
Closed
Description
Currently, the implementation for From<Box<T>> for Pin<Box<T>> is defined as:
impl<T> From<Box<T>> for Pin<Box<T>>https://doc.rust-lang.org/nightly/std/pin/struct.Pin.html#impl-From%3CBox%3CT%3E%3E
This does not allow trait objects to be pinned. It is however possible to call Box::pinned, and convert that into a trait object.
Is it intentional that T is required to be Sized on the From implementation?
Defining it as this:
impl<T: ?Sized> From<Box<T>> for Pin<Box<T>>allows to call Pin::from(trait_object)
F001, Nemo157, cramertj and hcpl
Metadata
Metadata
Assignees
Labels
No labels