Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c09d637

Browse files
committedSep 26, 2021
Auto merge of #88316 - est31:remove_box_tests, r=Mark-Simulacrum
Remove most box syntax uses from the testsuite except for src/test/ui/issues Removes most box syntax uses from the testsuite outside of the src/test/ui/issues directory. The goal was to only change tests where box syntax is an implementation detail instead of the actual feature being tested. So some tests were left out, like the regression test for #87935, or tests where the obtained error message changed significantly. Mostly this replaces box syntax with `Box::new`, but there are some minor drive by improvements, like formatting improvements or `assert_eq` instead of `assert!( == )`. Prior PR that removed box syntax from the compiler and tools: #87781
2 parents ac8dd1b + 6550021 commit c09d637

File tree

330 files changed

+999
-1193
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

330 files changed

+999
-1193
lines changed
 

‎src/test/debuginfo/borrowed-struct.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
// lldbr-check:(f64) *unique_val_interior_ref_2 = 26.5
6464

6565
#![allow(unused_variables)]
66-
#![feature(box_syntax)]
6766
#![feature(omit_gdb_pretty_printer_section)]
6867
#![omit_gdb_pretty_printer_section]
6968

@@ -79,7 +78,7 @@ fn main() {
7978
let stack_val_interior_ref_2: &f64 = &stack_val.y;
8079
let ref_to_unnamed: &SomeStruct = &SomeStruct { x: 11, y: 24.5 };
8180

82-
let unique_val: Box<_> = box SomeStruct { x: 13, y: 26.5 };
81+
let unique_val: Box<_> = Box::new(SomeStruct { x: 13, y: 26.5 });
8382
let unique_val_ref: &SomeStruct = &*unique_val;
8483
let unique_val_interior_ref_1: &isize = &unique_val.x;
8584
let unique_val_interior_ref_2: &f64 = &unique_val.y;

‎src/test/debuginfo/borrowed-tuple.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737

3838

3939
#![allow(unused_variables)]
40-
#![feature(box_syntax)]
4140
#![feature(omit_gdb_pretty_printer_section)]
4241
#![omit_gdb_pretty_printer_section]
4342

@@ -46,7 +45,7 @@ fn main() {
4645
let stack_val_ref: &(i16, f32) = &stack_val;
4746
let ref_to_unnamed: &(i16, f32) = &(-15, -20f32);
4847

49-
let unique_val: Box<(i16, f32)> = box (-17, -22f32);
48+
let unique_val: Box<(i16, f32)> = Box::new((-17, -22f32));
5049
let unique_val_ref: &(i16, f32) = &*unique_val;
5150

5251
zzz(); // #break

0 commit comments

Comments
 (0)
Please sign in to comment.