diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2025-06-10 16:54:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-10 16:54:50 +0200 |
| commit | e8be230f1ff21e00d54dd45f4f3119ca35ec2196 (patch) | |
| tree | 998b3f7fe5125aa4e19680723911bcbb637ec16b /compiler/rustc_middle/src/mir | |
| parent | 590f630ec6affc51dee868ad968743fe4b7251fc (diff) | |
| parent | c677dc26b4d9d5e742ff860ace924a270a2266b6 (diff) | |
| download | rust-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 'compiler/rustc_middle/src/mir')
| -rw-r--r-- | compiler/rustc_middle/src/mir/syntax.rs | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/mir/syntax.rs b/compiler/rustc_middle/src/mir/syntax.rs index bb068f3821d..f2f975a6968 100644 --- a/compiler/rustc_middle/src/mir/syntax.rs +++ b/compiler/rustc_middle/src/mir/syntax.rs @@ -1531,8 +1531,6 @@ pub enum CastKind { /// /// MIR is well-formed if the input and output types have different sizes, /// but running a transmute between differently-sized types is UB. - /// - /// Allowed only in [`MirPhase::Runtime`]; Earlier it's a [`TerminatorKind::Call`]. Transmute, } |
