summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/lower_intrinsics.transmute_to_ref_uninhabited.LowerIntrinsics.diff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
commit1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch)
tree3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /tests/mir-opt/lower_intrinsics.transmute_to_ref_uninhabited.LowerIntrinsics.diff
parentReleasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz
rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/mir-opt/lower_intrinsics.transmute_to_ref_uninhabited.LowerIntrinsics.diff')
-rw-r--r--tests/mir-opt/lower_intrinsics.transmute_to_ref_uninhabited.LowerIntrinsics.diff29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/mir-opt/lower_intrinsics.transmute_to_ref_uninhabited.LowerIntrinsics.diff b/tests/mir-opt/lower_intrinsics.transmute_to_ref_uninhabited.LowerIntrinsics.diff
new file mode 100644
index 000000000..c4d53d4e8
--- /dev/null
+++ b/tests/mir-opt/lower_intrinsics.transmute_to_ref_uninhabited.LowerIntrinsics.diff
@@ -0,0 +1,29 @@
+- // MIR for `transmute_to_ref_uninhabited` before LowerIntrinsics
++ // MIR for `transmute_to_ref_uninhabited` after LowerIntrinsics
+
+ fn transmute_to_ref_uninhabited() -> ! {
+ let mut _0: !; // return place in scope 0 at $DIR/lower_intrinsics.rs:+0:49: +0:50
+ let mut _1: !; // in scope 0 at $DIR/lower_intrinsics.rs:+0:51: +3:2
+ let _2: &Never; // in scope 0 at $DIR/lower_intrinsics.rs:+1:9: +1:10
+ let mut _3: !; // in scope 0 at $DIR/lower_intrinsics.rs:+2:5: +2:16
+ scope 1 {
+ debug x => _2; // in scope 1 at $DIR/lower_intrinsics.rs:+1:9: +1:10
+ }
+
+ bb0: {
+ StorageLive(_1); // scope 0 at $DIR/lower_intrinsics.rs:+0:51: +3:2
+ StorageLive(_2); // scope 0 at $DIR/lower_intrinsics.rs:+1:9: +1:10
+- _2 = transmute::<usize, &Never>(const 1_usize) -> [return: bb1, unwind unreachable]; // scope 0 at $DIR/lower_intrinsics.rs:+1:21: +1:48
+- // mir::Constant
+- // + span: $DIR/lower_intrinsics.rs:58:21: 58:40
+- // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(usize) -> &Never {transmute::<usize, &Never>}, val: Value(<ZST>) }
++ _2 = const 1_usize as &Never (Transmute); // scope 0 at $DIR/lower_intrinsics.rs:+1:21: +1:48
++ goto -> bb1; // scope 0 at $DIR/lower_intrinsics.rs:+1:21: +1:48
+ }
+
+ bb1: {
+ StorageLive(_3); // scope 1 at $DIR/lower_intrinsics.rs:+2:5: +2:16
+ unreachable; // scope 1 at $DIR/lower_intrinsics.rs:+2:11: +2:13
+ }
+ }
+