Allow converting Box<T: !Sized> -> Pin<Box<T>>

This commit is contained in:
Wim Looman 2019-01-03 21:03:29 +01:00
parent 48742c68d9
commit 5e3a560299

View File

@ -451,7 +451,7 @@ impl<T> From<T> for Box<T> {
}
#[stable(feature = "pin", since = "1.33.0")]
impl<T> From<Box<T>> for Pin<Box<T>> {
impl<T: ?Sized> From<Box<T>> for Pin<Box<T>> {
/// Converts a `Box<T>` into a `Pin<Box<T>>`
///
/// This conversion does not allocate on the heap and happens in place.