]> git.lizzy.rs Git - rust.git/blob - tests/ui/extern/extern-types-size_of_val.rs
Rollup merge of #104672 - Voultapher:unify-sort-modules, r=thomcc
[rust.git] / tests / ui / extern / extern-types-size_of_val.rs
1 // run-pass
2 #![feature(extern_types)]
3
4 use std::mem::{align_of_val, size_of_val};
5
6 extern "C" {
7     type A;
8 }
9
10 fn main() {
11     let x: &A = unsafe { &*(1usize as *const A) };
12
13     assert_eq!(size_of_val(x), 0);
14     assert_eq!(align_of_val(x), 1);
15 }