about summary refs log tree commit diff
path: root/library/alloc/tests/vec.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/alloc/tests/vec.rs')
-rw-r--r--library/alloc/tests/vec.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/library/alloc/tests/vec.rs b/library/alloc/tests/vec.rs
index bc1397146dd..cc768c73c0e 100644
--- a/library/alloc/tests/vec.rs
+++ b/library/alloc/tests/vec.rs
@@ -266,8 +266,8 @@ fn test_clone() {
 #[test]
 fn test_clone_from() {
     let mut v = vec![];
-    let three: Vec<Box<_>> = vec![box 1, box 2, box 3];
-    let two: Vec<Box<_>> = vec![box 4, box 5];
+    let three: Vec<Box<_>> = vec![Box::new(1), Box::new(2), Box::new(3)];
+    let two: Vec<Box<_>> = vec![Box::new(4), Box::new(5)];
     // zero, long
     v.clone_from(&three);
     assert_eq!(v, three);
@@ -407,11 +407,11 @@ fn test_dedup_by() {
 
 #[test]
 fn test_dedup_unique() {
-    let mut v0: Vec<Box<_>> = vec![box 1, box 1, box 2, box 3];
+    let mut v0: Vec<Box<_>> = vec![Box::new(1), Box::new(1), Box::new(2), Box::new(3)];
     v0.dedup();
-    let mut v1: Vec<Box<_>> = vec![box 1, box 2, box 2, box 3];
+    let mut v1: Vec<Box<_>> = vec![Box::new(1), Box::new(2), Box::new(2), Box::new(3)];
     v1.dedup();
-    let mut v2: Vec<Box<_>> = vec![box 1, box 2, box 3, box 3];
+    let mut v2: Vec<Box<_>> = vec![Box::new(1), Box::new(2), Box::new(3), Box::new(3)];
     v2.dedup();
     // If the boxed pointers were leaked or otherwise misused, valgrind
     // and/or rt should raise errors.