about summary refs log tree commit diff
path: root/library/std/src/sys_common
diff options
context:
space:
mode:
authorThom Chiovoloni <thom@shift.click>2022-11-20 16:55:41 -0800
committerThom Chiovoloni <thom@shift.click>2023-01-04 14:52:41 -0800
commita4bf36e87bdec61240fb3040774d008c70acbfbb (patch)
tree0d742d0fae99a7f6ce94d6d0f12f4086fe5ae890 /library/std/src/sys_common
parent659e169d37990b9c730a59a96081f2ef7afbe8f1 (diff)
downloadrust-a4bf36e87bdec61240fb3040774d008c70acbfbb.tar.gz
rust-a4bf36e87bdec61240fb3040774d008c70acbfbb.zip
Update rand in the stdlib tests, and remove the getrandom feature from it
Diffstat (limited to 'library/std/src/sys_common')
-rw-r--r--library/std/src/sys_common/io.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/library/std/src/sys_common/io.rs b/library/std/src/sys_common/io.rs
index d1e9fed41fc..4a42ff3c618 100644
--- a/library/std/src/sys_common/io.rs
+++ b/library/std/src/sys_common/io.rs
@@ -39,9 +39,10 @@ pub mod test {
         }
     }
 
+    #[track_caller] // for `test_rng`
     pub fn tmpdir() -> TempDir {
         let p = env::temp_dir();
-        let mut r = rand::thread_rng();
+        let mut r = crate::test_helpers::test_rng();
         let ret = p.join(&format!("rust-{}", r.next_u32()));
         fs::create_dir(&ret).unwrap();
         TempDir(ret)