We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bb690c6 + b61a4c2 commit dea03f1Copy full SHA for dea03f1
src/libcore/mem.rs
@@ -959,8 +959,9 @@ impl<T> ManuallyDrop<T> {
959
/// ManuallyDrop::new(Box::new(()));
960
/// ```
961
#[stable(feature = "manually_drop", since = "1.20.0")]
962
+ #[rustc_const_unstable(feature = "const_manually_drop_new")]
963
#[inline]
- pub fn new(value: T) -> ManuallyDrop<T> {
964
+ pub const fn new(value: T) -> ManuallyDrop<T> {
965
ManuallyDrop { value: value }
966
}
967
0 commit comments