diff options
Diffstat (limited to 'src/test/run-pass/empty-allocation-non-null.rs')
| -rw-r--r-- | src/test/run-pass/empty-allocation-non-null.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/test/run-pass/empty-allocation-non-null.rs b/src/test/run-pass/empty-allocation-non-null.rs index 269e0ee6ce4..0459206c5b9 100644 --- a/src/test/run-pass/empty-allocation-non-null.rs +++ b/src/test/run-pass/empty-allocation-non-null.rs @@ -8,18 +8,17 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![allow(unknown_features)] -#![feature(box_syntax)] +// FIXME (#22405): Replace `Box::new` with `box` here when/if possible. pub fn main() { - assert!(Some(box() ()).is_some()); + assert!(Some(Box::new(())).is_some()); - let xs: Box<[()]> = box []; + let xs: Box<[()]> = Box::<[(); 0]>::new([]); assert!(Some(xs).is_some()); struct Foo; - assert!(Some(box Foo).is_some()); + assert!(Some(Box::new(Foo)).is_some()); - let ys: Box<[Foo]> = box []; + let ys: Box<[Foo]> = Box::<[Foo; 0]>::new([]); assert!(Some(ys).is_some()); } |
