Skip to content

Commit 06930d2

Browse files
committed
FIX: Remove unused Copy/Clone for MaybeUninit
1 parent 85d9a06 commit 06930d2

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/maybe_uninit.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,13 @@ use std::mem::ManuallyDrop;
66
/// A combination of ManuallyDrop and “maybe uninitialized”;
77
/// this wraps a value that can be wholly or partially uninitialized;
88
/// it also has no drop regardless of the type of T.
9-
#[derive(Copy)]
109
#[repr(C)] // for cast from self ptr to value
1110
pub union MaybeUninit<T> {
1211
empty: (),
1312
value: ManuallyDrop<T>,
1413
}
1514
// Why we don't use std's MaybeUninit on nightly? See the ptr method
1615

17-
impl<T> Clone for MaybeUninit<T> where T: Copy
18-
{
19-
fn clone(&self) -> Self { *self }
20-
}
21-
2216
impl<T> MaybeUninit<T> {
2317
/// Create a new MaybeUninit with uninitialized interior
2418
pub unsafe fn uninitialized() -> Self {

0 commit comments

Comments
 (0)