diff options
| author | Jorge Aparicio <jorge@japaric.io> | 2018-04-21 23:22:27 +0200 |
|---|---|---|
| committer | Jorge Aparicio <jorge@japaric.io> | 2018-04-21 23:22:27 +0200 |
| commit | 2843e648c236c0ed31f0155f0805f43f3ee7ed95 (patch) | |
| tree | 5729619c71d0261fcc148091c993787b95680981 | |
| parent | d2577ca1ec1449bd83d05e540c57447574ccaa28 (diff) | |
| download | rust-2843e648c236c0ed31f0155f0805f43f3ee7ed95.tar.gz rust-2843e648c236c0ed31f0155f0805f43f3ee7ed95.zip | |
turn `ManuallyDrop::new` into a constant function
| -rw-r--r-- | src/libcore/mem.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index e3f08926610..6d64d91312e 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -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 } } |
