This commit is contained in:
The Miri Conjob Bot 2024-01-06 05:02:47 +00:00
parent 078f228085
commit 46f53c8b5d
2 changed files with 11 additions and 2 deletions

View File

@ -3,7 +3,12 @@
// Some targets treat arrays and structs very differently. We would probably catch that on those
// targets since we check the `PassMode`; here we ensure that we catch it on *all* targets
// (in particular, on x86-64 the pass mode is `Indirect` for both of these).
struct S(#[allow(dead_code)] i32, #[allow(dead_code)] i32, #[allow(dead_code)] i32, #[allow(dead_code)] i32);
struct S(
#[allow(dead_code)] i32,
#[allow(dead_code)] i32,
#[allow(dead_code)] i32,
#[allow(dead_code)] i32,
);
type A = [i32; 4];
fn main() {

View File

@ -1,6 +1,10 @@
//@compile-flags: -Zmiri-retag-fields=scalar
struct Newtype<'a>(#[allow(dead_code)] &'a mut i32, #[allow(dead_code)] i32, #[allow(dead_code)] i32);
struct Newtype<'a>(
#[allow(dead_code)] &'a mut i32,
#[allow(dead_code)] i32,
#[allow(dead_code)] i32,
);
fn dealloc_while_running(_n: Newtype<'_>, dealloc: impl FnOnce()) {
dealloc();