Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upManuallyDrop<T> where T: ?Sized #47034
Comments
kennytm
added
C-feature-request
T-lang
T-libs
labels
Dec 27, 2017
This comment has been minimized.
This comment has been minimized.
|
Doesn't seem possible until we get by-value DSTs |
This comment has been minimized.
This comment has been minimized.
|
@jonas-schievink care to explain why? |
This comment has been minimized.
This comment has been minimized.
|
Ah, nevermind. It would just need to make |
This comment has been minimized.
This comment has been minimized.
|
The struct Foo<T>(ManuallyDrop<T>);
let foo = Box::new(Foo(ManuallyDrop::new(5i32))) as Box<Foo<::std::any::Any>; |
This comment has been minimized.
This comment has been minimized.
|
I guess this would be possible by allowing |
mikeyhew commentedDec 27, 2017
ManuallyDrop<T>currently requiresT: Sized. It would be nice if we could remove this restriction. I'm not sure how to do it with the current implementation usingunionthough.