From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/abi/union/union-c-interop.rs | 37 -------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 src/test/ui/abi/union/union-c-interop.rs (limited to 'src/test/ui/abi/union') diff --git a/src/test/ui/abi/union/union-c-interop.rs b/src/test/ui/abi/union/union-c-interop.rs deleted file mode 100644 index 00f04d5b7..000000000 --- a/src/test/ui/abi/union/union-c-interop.rs +++ /dev/null @@ -1,37 +0,0 @@ -// run-pass -#![allow(non_snake_case)] - -// ignore-wasm32-bare no libc to test ffi with - -#[derive(Clone, Copy)] -#[repr(C)] -struct LARGE_INTEGER_U { - LowPart: u32, - HighPart: u32, -} - -#[derive(Clone, Copy)] -#[repr(C)] -union LARGE_INTEGER { - __unnamed__: LARGE_INTEGER_U, - u: LARGE_INTEGER_U, - QuadPart: u64, -} - -#[link(name = "rust_test_helpers", kind = "static")] -extern "C" { - fn increment_all_parts(_: LARGE_INTEGER) -> LARGE_INTEGER; -} - -fn main() { - unsafe { - let mut li = LARGE_INTEGER { QuadPart: 0 }; - let li_c = increment_all_parts(li); - li.__unnamed__.LowPart += 1; - li.__unnamed__.HighPart += 1; - li.u.LowPart += 1; - li.u.HighPart += 1; - li.QuadPart += 1; - assert_eq!(li.QuadPart, li_c.QuadPart); - } -} -- cgit v1.2.3