summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wang <cbeuw.andy@gmail.com>2023-05-15 12:05:17 +0200
committerAndy Wang <cbeuw.andy@gmail.com>2023-05-15 12:05:17 +0200
commit1bd6e168b24236fdb0b848537861a4b53feb4221 (patch)
treeed0d144a54af47c11364bd1cbc4008e57ddbf23f
parentc3ab4f28d37c9577dc401a08a72f82b752d32e53 (diff)
downloadrust-1bd6e168b24236fdb0b848537861a4b53feb4221.tar.gz
Address FIXME
-rw-r--r--tests/mir-opt/building/custom/projections.rs9
-rw-r--r--tests/mir-opt/building/custom/projections.tuples.built.after.mir8
2 files changed, 6 insertions, 11 deletions
diff --git a/tests/mir-opt/building/custom/projections.rs b/tests/mir-opt/building/custom/projections.rs
index bd6db0e5c4c..3c155deae4b 100644
--- a/tests/mir-opt/building/custom/projections.rs
+++ b/tests/mir-opt/building/custom/projections.rs
@@ -21,13 +21,10 @@ fn unions(u: U) -> i32 {
#[custom_mir(dialect = "analysis", phase = "post-cleanup")]
fn tuples(i: (u32, i32)) -> (u32, i32) {
mir!(
- // FIXME(JakobDegen): This is necessary because we can't give type hints for `RET`
- let temp: (u32, i32);
+ type RET = (u32, i32);
{
- temp.0 = i.0;
- temp.1 = i.1;
-
- RET = temp;
+ RET.0 = i.0;
+ RET.1 = i.1;
Return()
}
)
diff --git a/tests/mir-opt/building/custom/projections.tuples.built.after.mir b/tests/mir-opt/building/custom/projections.tuples.built.after.mir
index 65487d3c9ed..dec575200c6 100644
--- a/tests/mir-opt/building/custom/projections.tuples.built.after.mir
+++ b/tests/mir-opt/building/custom/projections.tuples.built.after.mir
@@ -2,12 +2,10 @@
fn tuples(_1: (u32, i32)) -> (u32, i32) {
let mut _0: (u32, i32); // return place in scope 0 at $DIR/projections.rs:+0:29: +0:39
- let mut _2: (u32, i32); // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
bb0: {
- (_2.0: u32) = (_1.0: u32); // scope 0 at $DIR/projections.rs:+5:13: +5:25
- (_2.1: i32) = (_1.1: i32); // scope 0 at $DIR/projections.rs:+6:13: +6:25
- _0 = _2; // scope 0 at $DIR/projections.rs:+8:13: +8:23
- return; // scope 0 at $DIR/projections.rs:+9:13: +9:21
+ (_0.0: u32) = (_1.0: u32); // scope 0 at $DIR/projections.rs:+4:13: +4:24
+ (_0.1: i32) = (_1.1: i32); // scope 0 at $DIR/projections.rs:+5:13: +5:24
+ return; // scope 0 at $DIR/projections.rs:+6:13: +6:21
}
}