]> git.lizzy.rs Git - rust.git/blob - src/test/ui/uninit-empty-types.rs
Auto merge of #62756 - newpavlov:stabilize_dur_float, r=alexcrichton
[rust.git] / src / test / ui / uninit-empty-types.rs
1 // run-pass
2 // Test the uninit() construct returning various empty types.
3
4 // pretty-expanded FIXME #23616
5
6 use std::mem;
7
8 #[derive(Clone)]
9 struct Foo;
10
11 #[allow(deprecated)]
12 pub fn main() {
13     unsafe {
14         let _x: Foo = mem::uninitialized();
15         let _x: [Foo; 2] = mem::uninitialized();
16     }
17 }