File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
branches/snap-stage3/src/libstd/rand Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: 9146a919b616e39e528e4d7100d16eef52f1f852
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: 556d971f83ea5950444b0a5b5392cd0040f077f6
4
+ refs/heads/snap-stage3: c3778fae6f57d30381476ea0110cb445e52b407a
5
5
refs/heads/try: 20cbbffeefc1f35e2ea63afce7b42fbd79611d42
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
Original file line number Diff line number Diff line change @@ -187,7 +187,10 @@ mod imp {
187
187
/// - iOS: calls SecRandomCopyBytes as /dev/(u)random is sandboxed
188
188
/// This does not block.
189
189
#[ allow( missing_copy_implementations) ]
190
- pub struct OsRng ;
190
+ pub struct OsRng {
191
+ // dummy field to ensure that this struct cannot be constructed outside of this module
192
+ _dummy : ( ) ,
193
+ }
191
194
192
195
#[ repr( C ) ]
193
196
struct SecRandom ;
@@ -204,7 +207,7 @@ mod imp {
204
207
impl OsRng {
205
208
/// Create a new `OsRng`.
206
209
pub fn new ( ) -> IoResult < OsRng > {
207
- Ok ( OsRng )
210
+ Ok ( OsRng { _dummy : ( ) } )
208
211
}
209
212
}
210
213
You can’t perform that action at this time.
0 commit comments