about summary refs log tree commit diff
path: root/library/std/src/thread
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/thread')
-rw-r--r--library/std/src/thread/tests.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/thread/tests.rs b/library/std/src/thread/tests.rs
index 7386fe1c442..5b8309cf5d2 100644
--- a/library/std/src/thread/tests.rs
+++ b/library/std/src/thread/tests.rs
@@ -127,7 +127,7 @@ where
 {
     let (tx, rx) = channel();
 
-    let x: Box<_> = box 1;
+    let x: Box<_> = Box::new(1);
     let x_in_parent = (&*x) as *const i32 as usize;
 
     spawnfn(Box::new(move || {
@@ -219,7 +219,7 @@ fn test_try_panic_any_message_owned_str() {
 #[test]
 fn test_try_panic_any_message_any() {
     match thread::spawn(move || {
-        panic_any(box 413u16 as Box<dyn Any + Send>);
+        panic_any(Box::new(413u16) as Box<dyn Any + Send>);
     })
     .join()
     {