rust/tests/mir-opt/const_prop/transmute.invalid_char.ConstProp.diff
Scott McMurray 64cce5fc7d Add CastKind::Transmute to MIR
Updates `interpret`, `codegen_ssa`, and `codegen_cranelift` to consume the new cast instead of the intrinsic.

Includes `CastTransmute` for custom MIR building, to be able to test the extra UB.
2023-03-22 15:15:41 -07:00

15 lines
456 B
Diff

- // MIR for `invalid_char` before ConstProp
+ // MIR for `invalid_char` after ConstProp
fn invalid_char() -> char {
let mut _0: char; // return place in scope 0 at $DIR/transmute.rs:+0:33: +0:37
scope 1 {
}
bb0: {
_0 = const _ as char (Transmute); // scope 1 at $DIR/transmute.rs:+1:14: +1:33
return; // scope 0 at $DIR/transmute.rs:+2:2: +2:2
}
}