From e08c9d1f812b02e397c6ef618472a2e5586879b6 Mon Sep 17 00:00:00 2001 From: Urgau Date: Sun, 17 Dec 2023 18:40:49 +0100 Subject: [PATCH] Allow invalid ref casting in Miri unaligned_ref_addr_of test --- .../miri/tests/fail/unaligned_pointers/unaligned_ref_addr_of.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ref_addr_of.rs b/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ref_addr_of.rs index 470420acd50..225feef7281 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ref_addr_of.rs +++ b/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ref_addr_of.rs @@ -1,6 +1,8 @@ // This should fail even without Stacked Borrows. //@compile-flags: -Zmiri-disable-stacked-borrows -Cdebug-assertions=no +#![allow(invalid_reference_casting)] // for u16 -> u32 + fn main() { // Try many times as this might work by chance. for _ in 0..20 {