We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84bed97 commit 6b22c09Copy full SHA for 6b22c09
src/libstd/util.rs
@@ -75,13 +75,11 @@ pub fn replace<T>(dest: &mut T, mut src: T) -> T {
75
}
76
77
/// A non-copyable dummy type.
78
-pub struct NonCopyable {
79
- priv i: (),
80
-}
+pub struct NonCopyable;
81
82
impl NonCopyable {
83
/// Creates a dummy non-copyable structure and returns it for use.
84
- pub fn new() -> NonCopyable { NonCopyable { i: () } }
+ pub fn new() -> NonCopyable { NonCopyable }
85
86
87
impl Drop for NonCopyable {
0 commit comments