Skip to content

Commit 2843e64

Browse files
committed
turn ManuallyDrop::new into a constant function
1 parent d2577ca commit 2843e64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/mem.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ impl<T> ManuallyDrop<T> {
960960
/// ```
961961
#[stable(feature = "manually_drop", since = "1.20.0")]
962962
#[inline]
963-
pub fn new(value: T) -> ManuallyDrop<T> {
963+
pub const fn new(value: T) -> ManuallyDrop<T> {
964964
ManuallyDrop { value: value }
965965
}
966966

0 commit comments

Comments
 (0)