Move /src/test to /tests
This commit is contained in:
parent
ca855e6e42
commit
cf2dff2b1e
27592 changed files with 0 additions and 0 deletions
14
tests/ui/empty-allocation-non-null.rs
Normal file
14
tests/ui/empty-allocation-non-null.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// run-pass
|
||||
|
||||
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());
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue