Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion tests/mir-opt/copy-prop/move_projection.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// skip-filecheck
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
//@ test-mir-pass: CopyProp

Expand All @@ -15,6 +14,12 @@ struct Foo(u8);

#[custom_mir(dialect = "runtime")]
fn f(a: Foo) -> bool {
// CHECK-LABEL: fn f(
// CHECK-SAME: [[a:_.*]]: Foo)
// CHECK: bb0: {
// CHECK-NOT: _2 = copy [[a]];
// CHECK-NOT: _3 = move (_2.0: u8);
// CHECK: _3 = copy ([[a]].0: u8);
mir! {
{
let b = a;
Expand Down