about summary refs log tree commit diff
path: root/src/libstd/rand
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-12-17 08:34:09 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-12-17 11:50:25 -0800
commitdbd68c70cda23990617a6e255fc0fcce4829cddc (patch)
treea1e486057271cbaa6bfa9e88c26d7e188a3a2319 /src/libstd/rand
parentbdb1146181e4c320255bec4a93af3d645d522d59 (diff)
parentc3778fae6f57d30381476ea0110cb445e52b407a (diff)
downloadrust-dbd68c70cda23990617a6e255fc0fcce4829cddc.tar.gz
rust-dbd68c70cda23990617a6e255fc0fcce4829cddc.zip
rollup merge of #19832: japaric/no-nocopy
r? @aturon / @alexcrichton
Diffstat (limited to 'src/libstd/rand')
-rw-r--r--src/libstd/rand/os.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libstd/rand/os.rs b/src/libstd/rand/os.rs
index bbe8edc0f00..4677f168bf5 100644
--- a/src/libstd/rand/os.rs
+++ b/src/libstd/rand/os.rs
@@ -186,8 +186,10 @@ mod imp {
     ///   service provider with the `PROV_RSA_FULL` type.
     /// - iOS: calls SecRandomCopyBytes as /dev/(u)random is sandboxed
     /// This does not block.
+    #[allow(missing_copy_implementations)]
     pub struct OsRng {
-        marker: marker::NoCopy
+        // dummy field to ensure that this struct cannot be constructed outside of this module
+        _dummy: (),
     }
 
     #[repr(C)]
@@ -205,7 +207,7 @@ mod imp {
     impl OsRng {
         /// Create a new `OsRng`.
         pub fn new() -> IoResult<OsRng> {
-            Ok(OsRng {marker: marker::NoCopy} )
+            Ok(OsRng { _dummy: () })
         }
     }