about summary refs log tree commit diff
path: root/tests/ui
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2025-06-10 16:54:50 +0200
committerGitHub <noreply@github.com>2025-06-10 16:54:50 +0200
commite8be230f1ff21e00d54dd45f4f3119ca35ec2196 (patch)
tree998b3f7fe5125aa4e19680723911bcbb637ec16b /tests/ui
parent590f630ec6affc51dee868ad968743fe4b7251fc (diff)
parentc677dc26b4d9d5e742ff860ace924a270a2266b6 (diff)
downloadrust-e8be230f1ff21e00d54dd45f4f3119ca35ec2196.tar.gz
rust-e8be230f1ff21e00d54dd45f4f3119ca35ec2196.zip
Rollup merge of #142124 - oli-obk:transmute-cast, r=scottmcm
Allow transmute casts in pre-runtime-MIR

r? ``@scottmcm``

cc ``@BoxyUwU``

turns out in https://github.com/rust-lang/rust/pull/138393 I erroneously used transmute casts in https://github.com/rust-lang/rust/blob/fd3da4bebdff63b7529483ff7025986ef16bf463/compiler/rustc_mir_build/src/builder/matches/test.rs#L209

I don't think they have any issues using them before runtime, we just checked for them because we didn't have code exercising those code paths
Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/type/pattern_types/matching.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/ui/type/pattern_types/matching.rs b/tests/ui/type/pattern_types/matching.rs
index b8463a8e822..21f89b3b673 100644
--- a/tests/ui/type/pattern_types/matching.rs
+++ b/tests/ui/type/pattern_types/matching.rs
@@ -1,6 +1,7 @@
 #![feature(pattern_types, pattern_type_macro, structural_match)]
 
 //@ check-pass
+//@ compile-flags: -Zvalidate-mir
 
 use std::marker::StructuralPartialEq;
 use std::pat::pattern_type;