turn ManuallyDrop::new into a constant function

This commit is contained in:
Jorge Aparicio 2018-04-21 23:22:27 +02:00
parent d2577ca1ec
commit 2843e648c2

View file

@ -960,7 +960,7 @@ impl<T> ManuallyDrop<T> {
/// ```
#[stable(feature = "manually_drop", since = "1.20.0")]
#[inline]
pub fn new(value: T) -> ManuallyDrop<T> {
pub const fn new(value: T) -> ManuallyDrop<T> {
ManuallyDrop { value: value }
}