From 2843e648c236c0ed31f0155f0805f43f3ee7ed95 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sat, 21 Apr 2018 23:22:27 +0200 Subject: [PATCH] turn `ManuallyDrop::new` into a constant function --- src/libcore/mem.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index e3f08926610f..6d64d91312e0 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -960,7 +960,7 @@ impl ManuallyDrop { /// ``` #[stable(feature = "manually_drop", since = "1.20.0")] #[inline] - pub fn new(value: T) -> ManuallyDrop { + pub const fn new(value: T) -> ManuallyDrop { ManuallyDrop { value: value } }