diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-12-18 15:15:35 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-12-18 15:15:35 +0000 |
| commit | 697aa0a320653d004e5a477a8231320974d29785 (patch) | |
| tree | 2cfd6e0dac709901b8669114d342d770d3b4a4ee | |
| parent | fdcf56c5b74b84d79ba9d4262574464e49808ad2 (diff) | |
| download | rust-697aa0a320653d004e5a477a8231320974d29785.tar.gz rust-697aa0a320653d004e5a477a8231320974d29785.zip | |
Fix test for size_of_val and align_of_val panicking on extern types
| -rw-r--r-- | example/mini_core_hello_world.rs | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/example/mini_core_hello_world.rs b/example/mini_core_hello_world.rs index 3e4edcf6f54..a1cdf31c68a 100644 --- a/example/mini_core_hello_world.rs +++ b/example/mini_core_hello_world.rs @@ -337,17 +337,6 @@ fn main() { static REF2: &u8 = REF1; assert_eq!(*REF1, *REF2); - extern "C" { - type A; - } - - fn main() { - let x: &A = unsafe { &*(1usize as *const A) }; - - assert_eq!(unsafe { intrinsics::size_of_val(x) }, 0); - assert_eq!(unsafe { intrinsics::min_align_of_val(x) }, 1); - } - #[repr(simd)] struct V([f64; 2]); |
