summary refs log tree commit diff
path: root/library/std/src/thread
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2022-05-29 00:25:32 +0200
committerest31 <MTest31@outlook.com>2022-05-29 01:44:11 +0200
commitd75c60f9a37c9b1810ddcdf19216da76319bdf04 (patch)
treedb61a2b833b4d163e0a90fcdda6d6dff983ed9cd /library/std/src/thread
parent7230a15c32d01e1653d98c39ddd79097a59b550c (diff)
downloadrust-d75c60f9a37c9b1810ddcdf19216da76319bdf04.tar.gz
rust-d75c60f9a37c9b1810ddcdf19216da76319bdf04.zip
Use Box::new() instead of box syntax in std tests
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()
     {