blob: 31117936c76ac1d51f9e73cd392cf6094969925d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
pub fn main() {
assert!(Some(Box::new(())).is_some());
let xs: Box<[()]> = Box::<[(); 0]>::new([]);
assert!(Some(xs).is_some());
struct Foo;
assert!(Some(Box::new(Foo)).is_some());
let ys: Box<[Foo]> = Box::<[Foo; 0]>::new([]);
assert!(Some(ys).is_some());
}
|