diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:58 +0000 |
commit | a4b7ed7a42c716ab9f05e351f003d589124fd55d (patch) | |
tree | b620cd3f223850b28716e474e80c58059dca5dd4 /src/test/mir-opt/building/custom/simple_assign.rs | |
parent | Adding upstream version 1.67.1+dfsg1. (diff) | |
download | rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.tar.xz rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.zip |
Adding upstream version 1.68.2+dfsg1.upstream/1.68.2+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/mir-opt/building/custom/simple_assign.rs')
-rw-r--r-- | src/test/mir-opt/building/custom/simple_assign.rs | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/test/mir-opt/building/custom/simple_assign.rs b/src/test/mir-opt/building/custom/simple_assign.rs deleted file mode 100644 index ec6dbe1d0..000000000 --- a/src/test/mir-opt/building/custom/simple_assign.rs +++ /dev/null @@ -1,37 +0,0 @@ -#![feature(custom_mir, core_intrinsics)] - -extern crate core; -use core::intrinsics::mir::*; - -// EMIT_MIR simple_assign.simple.built.after.mir -#[custom_mir(dialect = "built")] -pub fn simple(x: i32) -> i32 { - mir!( - let temp1: i32; - let temp2: _; - - { - temp1 = x; - Goto(exit) - } - - exit = { - temp2 = Move(temp1); - RET = temp2; - Return() - } - ) -} - -// EMIT_MIR simple_assign.simple_ref.built.after.mir -#[custom_mir(dialect = "built")] -pub fn simple_ref(x: &mut i32) -> &mut i32 { - mir!({ - RET = Move(x); - Return() - }) -} - -fn main() { - assert_eq!(5, simple(5)); -} |