diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2024-08-18 14:26:34 -0700 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2024-08-18 16:07:33 -0700 |
| commit | 99cb0c6bc399fb94a0ddde7e9b38e9c00d523bad (patch) | |
| tree | bb59a5f90f8a4a26f498d6748aec34d14a01d052 /tests/mir-opt/building | |
| parent | 249a36ffbd577fc76153b7ad4cafd33607ee4ddc (diff) | |
| download | rust-99cb0c6bc399fb94a0ddde7e9b38e9c00d523bad.tar.gz rust-99cb0c6bc399fb94a0ddde7e9b38e9c00d523bad.zip | |
Bless *all* the mir-opt tests
Diffstat (limited to 'tests/mir-opt/building')
51 files changed, 174 insertions, 174 deletions
diff --git a/tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir b/tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir index c0f16ee7ec0..c1c2fdcfa94 100644 --- a/tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir +++ b/tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir @@ -151,7 +151,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body of b()}>, _2: &mut Context<'_>) -> StorageLive(_13); StorageLive(_14); StorageLive(_15); - _15 = _38; + _15 = copy _38; _14 = move _15; goto -> bb6; } @@ -194,8 +194,8 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body of b()}>, _2: &mut Context<'_>) -> bb10: { StorageLive(_17); - _17 = ((_9 as Ready).0: ()); - _3 = _17; + _17 = copy ((_9 as Ready).0: ()); + _3 = copy _17; StorageDead(_17); StorageDead(_14); StorageDead(_12); @@ -253,7 +253,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body of b()}>, _2: &mut Context<'_>) -> StorageLive(_29); StorageLive(_30); StorageLive(_31); - _31 = _38; + _31 = copy _38; _30 = move _31; goto -> bb18; } @@ -291,8 +291,8 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body of b()}>, _2: &mut Context<'_>) -> bb21: { StorageLive(_33); - _33 = ((_25 as Ready).0: ()); - _37 = _33; + _33 = copy ((_25 as Ready).0: ()); + _37 = copy _33; StorageDead(_33); StorageDead(_30); StorageDead(_28); diff --git a/tests/mir-opt/building/custom/aggregate_exprs.adt.built.after.mir b/tests/mir-opt/building/custom/aggregate_exprs.adt.built.after.mir index c14882142f5..6d4d261b895 100644 --- a/tests/mir-opt/building/custom/aggregate_exprs.adt.built.after.mir +++ b/tests/mir-opt/building/custom/aggregate_exprs.adt.built.after.mir @@ -9,8 +9,8 @@ fn adt() -> Onion { bb0: { _1 = const 1_i32; _2 = Foo { a: const 1_i32, b: const 2_i32 }; - _3 = Bar::Foo(move _2, _1); - _0 = Onion { neon: ((_3 as variant#0).1: i32) }; + _3 = Bar::Foo(move _2, copy _1); + _0 = Onion { neon: copy ((_3 as variant#0).1: i32) }; return; } } diff --git a/tests/mir-opt/building/custom/aggregate_exprs.array.built.after.mir b/tests/mir-opt/building/custom/aggregate_exprs.array.built.after.mir index fde007abab0..2c14258956a 100644 --- a/tests/mir-opt/building/custom/aggregate_exprs.array.built.after.mir +++ b/tests/mir-opt/building/custom/aggregate_exprs.array.built.after.mir @@ -8,7 +8,7 @@ fn array() -> [i32; 2] { bb0: { _1 = [const 42_i32, const 43_i32]; _2 = const 1_i32; - _1 = [_2, const 2_i32]; + _1 = [copy _2, const 2_i32]; _0 = move _1; return; } diff --git a/tests/mir-opt/building/custom/arbitrary_let.arbitrary_let.built.after.mir b/tests/mir-opt/building/custom/arbitrary_let.arbitrary_let.built.after.mir index 189996f1179..72a16b35885 100644 --- a/tests/mir-opt/building/custom/arbitrary_let.arbitrary_let.built.after.mir +++ b/tests/mir-opt/building/custom/arbitrary_let.arbitrary_let.built.after.mir @@ -6,17 +6,17 @@ fn arbitrary_let(_1: i32) -> i32 { let mut _3: i32; bb0: { - _2 = _1; + _2 = copy _1; goto -> bb2; } bb1: { - _0 = _3; + _0 = copy _3; return; } bb2: { - _3 = _2; + _3 = copy _2; goto -> bb1; } } diff --git a/tests/mir-opt/building/custom/arrays.arrays.built.after.mir b/tests/mir-opt/building/custom/arrays.arrays.built.after.mir index eaeba302f15..30d11e31e4d 100644 --- a/tests/mir-opt/building/custom/arrays.arrays.built.after.mir +++ b/tests/mir-opt/building/custom/arrays.arrays.built.after.mir @@ -8,7 +8,7 @@ fn arrays() -> usize { bb0: { _1 = [const 5_i32; C]; _2 = Len(_1); - _0 = _2; + _0 = copy _2; return; } } diff --git a/tests/mir-opt/building/custom/as_cast.float_to_int.built.after.mir b/tests/mir-opt/building/custom/as_cast.float_to_int.built.after.mir index e3334bc7dbe..93750719d27 100644 --- a/tests/mir-opt/building/custom/as_cast.float_to_int.built.after.mir +++ b/tests/mir-opt/building/custom/as_cast.float_to_int.built.after.mir @@ -4,7 +4,7 @@ fn float_to_int(_1: f32) -> i32 { let mut _0: i32; bb0: { - _0 = _1 as i32 (FloatToInt); + _0 = copy _1 as i32 (FloatToInt); return; } } diff --git a/tests/mir-opt/building/custom/as_cast.int_to_int.built.after.mir b/tests/mir-opt/building/custom/as_cast.int_to_int.built.after.mir index d71cb9d78d3..9adec45d64b 100644 --- a/tests/mir-opt/building/custom/as_cast.int_to_int.built.after.mir +++ b/tests/mir-opt/building/custom/as_cast.int_to_int.built.after.mir @@ -4,7 +4,7 @@ fn int_to_int(_1: u32) -> i32 { let mut _0: i32; bb0: { - _0 = _1 as i32 (IntToInt); + _0 = copy _1 as i32 (IntToInt); return; } } diff --git a/tests/mir-opt/building/custom/as_cast.int_to_ptr.built.after.mir b/tests/mir-opt/building/custom/as_cast.int_to_ptr.built.after.mir index faff79e8c57..aa642258095 100644 --- a/tests/mir-opt/building/custom/as_cast.int_to_ptr.built.after.mir +++ b/tests/mir-opt/building/custom/as_cast.int_to_ptr.built.after.mir @@ -4,7 +4,7 @@ fn int_to_ptr(_1: usize) -> *const i32 { let mut _0: *const i32; bb0: { - _0 = _1 as *const i32 (PointerWithExposedProvenance); + _0 = copy _1 as *const i32 (PointerWithExposedProvenance); return; } } diff --git a/tests/mir-opt/building/custom/assume.assume_local.built.after.mir b/tests/mir-opt/building/custom/assume.assume_local.built.after.mir index 7ea1fcd30c2..36e2859ce16 100644 --- a/tests/mir-opt/building/custom/assume.assume_local.built.after.mir +++ b/tests/mir-opt/building/custom/assume.assume_local.built.after.mir @@ -4,7 +4,7 @@ fn assume_local(_1: bool) -> () { let mut _0: (); bb0: { - assume(_1); + assume(copy _1); return; } } diff --git a/tests/mir-opt/building/custom/assume.assume_place.built.after.mir b/tests/mir-opt/building/custom/assume.assume_place.built.after.mir index ce914618d3d..074af333d63 100644 --- a/tests/mir-opt/building/custom/assume.assume_place.built.after.mir +++ b/tests/mir-opt/building/custom/assume.assume_place.built.after.mir @@ -4,7 +4,7 @@ fn assume_place(_1: (bool, u8)) -> () { let mut _0: (); bb0: { - assume((_1.0: bool)); + assume(copy (_1.0: bool)); return; } } diff --git a/tests/mir-opt/building/custom/enums.switch_bool.built.after.mir b/tests/mir-opt/building/custom/enums.switch_bool.built.after.mir index f82e5f1c6fd..beefef331df 100644 --- a/tests/mir-opt/building/custom/enums.switch_bool.built.after.mir +++ b/tests/mir-opt/building/custom/enums.switch_bool.built.after.mir @@ -4,7 +4,7 @@ fn switch_bool(_1: bool) -> u32 { let mut _0: u32; bb0: { - switchInt(_1) -> [1: bb1, 0: bb2, otherwise: bb2]; + switchInt(copy _1) -> [1: bb1, 0: bb2, otherwise: bb2]; } bb1: { diff --git a/tests/mir-opt/building/custom/enums.switch_option.built.after.mir b/tests/mir-opt/building/custom/enums.switch_option.built.after.mir index fa03f274be3..a854df87866 100644 --- a/tests/mir-opt/building/custom/enums.switch_option.built.after.mir +++ b/tests/mir-opt/building/custom/enums.switch_option.built.after.mir @@ -6,7 +6,7 @@ fn switch_option(_1: Option<()>) -> bool { bb0: { _2 = discriminant(_1); - switchInt(_2) -> [0: bb1, 1: bb2, otherwise: bb2]; + switchInt(copy _2) -> [0: bb1, 1: bb2, otherwise: bb2]; } bb1: { diff --git a/tests/mir-opt/building/custom/enums.switch_option_repr.built.after.mir b/tests/mir-opt/building/custom/enums.switch_option_repr.built.after.mir index eec2197a8bd..4ffc08772a8 100644 --- a/tests/mir-opt/building/custom/enums.switch_option_repr.built.after.mir +++ b/tests/mir-opt/building/custom/enums.switch_option_repr.built.after.mir @@ -6,7 +6,7 @@ fn switch_option_repr(_1: Bool) -> bool { bb0: { _2 = discriminant(_1); - switchInt(_2) -> [0: bb2, otherwise: bb1]; + switchInt(copy _2) -> [0: bb2, otherwise: bb1]; } bb1: { diff --git a/tests/mir-opt/building/custom/operators.f.built.after.mir b/tests/mir-opt/building/custom/operators.f.built.after.mir index cac82f7b3ea..ed6cddd548f 100644 --- a/tests/mir-opt/building/custom/operators.f.built.after.mir +++ b/tests/mir-opt/building/custom/operators.f.built.after.mir @@ -5,26 +5,26 @@ fn f(_1: i32, _2: bool) -> i32 { let mut _3: (i32, bool); bb0: { - _1 = Neg(_1); - _2 = Not(_2); - _1 = Add(_1, _1); - _1 = Sub(_1, _1); - _1 = Mul(_1, _1); - _1 = Div(_1, _1); - _1 = Rem(_1, _1); - _1 = BitXor(_1, _1); - _1 = BitAnd(_1, _1); - _1 = Shl(_1, _1); - _1 = Shr(_1, _1); - _2 = Eq(_1, _1); - _2 = Lt(_1, _1); - _2 = Le(_1, _1); - _2 = Ge(_1, _1); - _2 = Gt(_1, _1); - _3 = AddWithOverflow(_1, _1); - _2 = (_3.1: bool); - _1 = (_3.0: i32); - _0 = _1; + _1 = Neg(copy _1); + _2 = Not(copy _2); + _1 = Add(copy _1, copy _1); + _1 = Sub(copy _1, copy _1); + _1 = Mul(copy _1, copy _1); + _1 = Div(copy _1, copy _1); + _1 = Rem(copy _1, copy _1); + _1 = BitXor(copy _1, copy _1); + _1 = BitAnd(copy _1, copy _1); + _1 = Shl(copy _1, copy _1); + _1 = Shr(copy _1, copy _1); + _2 = Eq(copy _1, copy _1); + _2 = Lt(copy _1, copy _1); + _2 = Le(copy _1, copy _1); + _2 = Ge(copy _1, copy _1); + _2 = Gt(copy _1, copy _1); + _3 = AddWithOverflow(copy _1, copy _1); + _2 = copy (_3.1: bool); + _1 = copy (_3.0: i32); + _0 = copy _1; return; } } diff --git a/tests/mir-opt/building/custom/operators.g.runtime.after.mir b/tests/mir-opt/building/custom/operators.g.runtime.after.mir index a0ad7d0f93f..7d87fd93278 100644 --- a/tests/mir-opt/building/custom/operators.g.runtime.after.mir +++ b/tests/mir-opt/building/custom/operators.g.runtime.after.mir @@ -6,8 +6,8 @@ fn g(_1: *const i32, _2: *const [i32]) -> () { let mut _4: usize; bb0: { - _3 = PtrMetadata(_1); - _4 = PtrMetadata(_2); + _3 = PtrMetadata(copy _1); + _4 = PtrMetadata(copy _2); return; } } diff --git a/tests/mir-opt/building/custom/projections.copy_for_deref.built.after.mir b/tests/mir-opt/building/custom/projections.copy_for_deref.built.after.mir index b1ba5f9314d..b28e96f10ea 100644 --- a/tests/mir-opt/building/custom/projections.copy_for_deref.built.after.mir +++ b/tests/mir-opt/building/custom/projections.copy_for_deref.built.after.mir @@ -6,7 +6,7 @@ fn copy_for_deref(_1: (&i32, i32)) -> i32 { bb0: { _2 = deref_copy (_1.0: &i32); - _0 = (*_2); + _0 = copy (*_2); return; } } diff --git a/tests/mir-opt/building/custom/projections.simple_index.built.after.mir b/tests/mir-opt/building/custom/projections.simple_index.built.after.mir index f74c61009d3..2cd781696da 100644 --- a/tests/mir-opt/building/custom/projections.simple_index.built.after.mir +++ b/tests/mir-opt/building/custom/projections.simple_index.built.after.mir @@ -6,8 +6,8 @@ fn simple_index(_1: [i32; 10], _2: &[i32]) -> i32 { bb0: { _3 = const 3_usize; - _0 = _1[_3]; - _0 = (*_2)[_3]; + _0 = copy _1[_3]; + _0 = copy (*_2)[_3]; 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 a370de2ed84..d07269cd0d3 100644 --- a/tests/mir-opt/building/custom/projections.tuples.built.after.mir +++ b/tests/mir-opt/building/custom/projections.tuples.built.after.mir @@ -4,8 +4,8 @@ fn tuples(_1: (u32, i32)) -> (u32, i32) { let mut _0: (u32, i32); bb0: { - (_0.0: u32) = (_1.0: u32); - (_0.1: i32) = (_1.1: i32); + (_0.0: u32) = copy (_1.0: u32); + (_0.1: i32) = copy (_1.1: i32); return; } } diff --git a/tests/mir-opt/building/custom/projections.unions.built.after.mir b/tests/mir-opt/building/custom/projections.unions.built.after.mir index 4189b329e8c..fe4f7acebb5 100644 --- a/tests/mir-opt/building/custom/projections.unions.built.after.mir +++ b/tests/mir-opt/building/custom/projections.unions.built.after.mir @@ -4,7 +4,7 @@ fn unions(_1: U) -> i32 { let mut _0: i32; bb0: { - _0 = (_1.0: i32); + _0 = copy (_1.0: i32); return; } } diff --git a/tests/mir-opt/building/custom/projections.unwrap.built.after.mir b/tests/mir-opt/building/custom/projections.unwrap.built.after.mir index 0c43bdc9d24..ea706e0a97d 100644 --- a/tests/mir-opt/building/custom/projections.unwrap.built.after.mir +++ b/tests/mir-opt/building/custom/projections.unwrap.built.after.mir @@ -4,7 +4,7 @@ fn unwrap(_1: Option<i32>) -> i32 { let mut _0: i32; bb0: { - _0 = ((_1 as variant#1).0: i32); + _0 = copy ((_1 as variant#1).0: i32); return; } } diff --git a/tests/mir-opt/building/custom/projections.unwrap_deref.built.after.mir b/tests/mir-opt/building/custom/projections.unwrap_deref.built.after.mir index 39e97851343..eb83dcece3e 100644 --- a/tests/mir-opt/building/custom/projections.unwrap_deref.built.after.mir +++ b/tests/mir-opt/building/custom/projections.unwrap_deref.built.after.mir @@ -4,7 +4,7 @@ fn unwrap_deref(_1: Option<&i32>) -> i32 { let mut _0: i32; bb0: { - _0 = (*((_1 as variant#1).0: &i32)); + _0 = copy (*((_1 as variant#1).0: &i32)); return; } } diff --git a/tests/mir-opt/building/custom/references.raw_pointer_offset.built.after.mir b/tests/mir-opt/building/custom/references.raw_pointer_offset.built.after.mir index 8046b543eef..3893613bff9 100644 --- a/tests/mir-opt/building/custom/references.raw_pointer_offset.built.after.mir +++ b/tests/mir-opt/building/custom/references.raw_pointer_offset.built.after.mir @@ -4,7 +4,7 @@ fn raw_pointer_offset(_1: *const i32) -> *const i32 { let mut _0: *const i32; bb0: { - _0 = Offset(_1, const 1_isize); + _0 = Offset(copy _1, const 1_isize); return; } } diff --git a/tests/mir-opt/building/custom/simple_assign.simple.built.after.mir b/tests/mir-opt/building/custom/simple_assign.simple.built.after.mir index 6f7aaeed979..10ad840f98c 100644 --- a/tests/mir-opt/building/custom/simple_assign.simple.built.after.mir +++ b/tests/mir-opt/building/custom/simple_assign.simple.built.after.mir @@ -7,14 +7,14 @@ fn simple(_1: i32) -> i32 { bb0: { StorageLive(_2); - _2 = _1; + _2 = copy _1; goto -> bb1; } bb1: { _3 = move _2; StorageDead(_2); - _0 = _3; + _0 = copy _3; return; } } diff --git a/tests/mir-opt/building/custom/terminators.assert_nonzero.built.after.mir b/tests/mir-opt/building/custom/terminators.assert_nonzero.built.after.mir index 9cf26dff350..44030abc797 100644 --- a/tests/mir-opt/building/custom/terminators.assert_nonzero.built.after.mir +++ b/tests/mir-opt/building/custom/terminators.assert_nonzero.built.after.mir @@ -4,7 +4,7 @@ fn assert_nonzero(_1: i32) -> () { let mut _0: (); bb0: { - switchInt(_1) -> [0: bb1, otherwise: bb2]; + switchInt(copy _1) -> [0: bb1, otherwise: bb2]; } bb1: { diff --git a/tests/mir-opt/building/custom/terminators.direct_call.built.after.mir b/tests/mir-opt/building/custom/terminators.direct_call.built.after.mir index 07044ceaef4..b29d4ec7095 100644 --- a/tests/mir-opt/building/custom/terminators.direct_call.built.after.mir +++ b/tests/mir-opt/building/custom/terminators.direct_call.built.after.mir @@ -4,7 +4,7 @@ fn direct_call(_1: i32) -> i32 { let mut _0: i32; bb0: { - _0 = ident::<i32>(_1) -> [return: bb1, unwind continue]; + _0 = ident::<i32>(copy _1) -> [return: bb1, unwind continue]; } bb1: { diff --git a/tests/mir-opt/building/custom/terminators.indirect_call.built.after.mir b/tests/mir-opt/building/custom/terminators.indirect_call.built.after.mir index 3b849354dcd..b88f6603026 100644 --- a/tests/mir-opt/building/custom/terminators.indirect_call.built.after.mir +++ b/tests/mir-opt/building/custom/terminators.indirect_call.built.after.mir @@ -4,7 +4,7 @@ fn indirect_call(_1: i32, _2: fn(i32) -> i32) -> i32 { let mut _0: i32; bb0: { - _0 = _2(_1) -> [return: bb1, unwind continue]; + _0 = copy _2(copy _1) -> [return: bb1, unwind continue]; } bb1: { diff --git a/tests/mir-opt/building/custom/terminators.tail_call.built.after.mir b/tests/mir-opt/building/custom/terminators.tail_call.built.after.mir index 4cf6e459aa8..ab3925dae1c 100644 --- a/tests/mir-opt/building/custom/terminators.tail_call.built.after.mir +++ b/tests/mir-opt/building/custom/terminators.tail_call.built.after.mir @@ -5,7 +5,7 @@ fn tail_call(_1: i32) -> i32 { let mut _2: i32; bb0: { - _2 = Add(_1, const 42_i32); - tailcall ident::<i32>(Spanned { node: _2, span: $DIR/terminators.rs:32:28: 32:29 (#0) }); + _2 = Add(copy _1, const 42_i32); + tailcall ident::<i32>(Spanned { node: copy _2, span: $DIR/terminators.rs:32:28: 32:29 (#0) }); } } diff --git a/tests/mir-opt/building/enum_cast.bar.built.after.mir b/tests/mir-opt/building/enum_cast.bar.built.after.mir index 512c7321619..72d0cf5d1e8 100644 --- a/tests/mir-opt/building/enum_cast.bar.built.after.mir +++ b/tests/mir-opt/building/enum_cast.bar.built.after.mir @@ -12,8 +12,8 @@ fn bar(_1: Bar) -> usize { StorageLive(_2); _2 = move _1; _3 = discriminant(_2); - _4 = _3 as u8 (IntToInt); - _5 = Le(_4, const 1_u8); + _4 = copy _3 as u8 (IntToInt); + _5 = Le(copy _4, const 1_u8); assume(move _5); _0 = move _3 as usize (IntToInt); StorageDead(_2); diff --git a/tests/mir-opt/building/enum_cast.boo.built.after.mir b/tests/mir-opt/building/enum_cast.boo.built.after.mir index ad0adf14e4a..91e06dc8862 100644 --- a/tests/mir-opt/building/enum_cast.boo.built.after.mir +++ b/tests/mir-opt/building/enum_cast.boo.built.after.mir @@ -12,8 +12,8 @@ fn boo(_1: Boo) -> usize { StorageLive(_2); _2 = move _1; _3 = discriminant(_2); - _4 = _3 as u8 (IntToInt); - _5 = Le(_4, const 1_u8); + _4 = copy _3 as u8 (IntToInt); + _5 = Le(copy _4, const 1_u8); assume(move _5); _0 = move _3 as usize (IntToInt); StorageDead(_2); diff --git a/tests/mir-opt/building/enum_cast.droppy.built.after.mir b/tests/mir-opt/building/enum_cast.droppy.built.after.mir index ea0edb610f5..f53c9199a49 100644 --- a/tests/mir-opt/building/enum_cast.droppy.built.after.mir +++ b/tests/mir-opt/building/enum_cast.droppy.built.after.mir @@ -31,8 +31,8 @@ fn droppy() -> () { StorageLive(_4); _4 = move _2; _5 = discriminant(_4); - _6 = _5 as u8 (IntToInt); - _7 = Le(_6, const 2_u8); + _6 = copy _5 as u8 (IntToInt); + _7 = Le(copy _6, const 2_u8); assume(move _7); _3 = move _5 as usize (IntToInt); drop(_4) -> [return: bb1, unwind: bb4]; diff --git a/tests/mir-opt/building/enum_cast.far.built.after.mir b/tests/mir-opt/building/enum_cast.far.built.after.mir index e75803c706d..14eaf344190 100644 --- a/tests/mir-opt/building/enum_cast.far.built.after.mir +++ b/tests/mir-opt/building/enum_cast.far.built.after.mir @@ -12,8 +12,8 @@ fn far(_1: Far) -> isize { StorageLive(_2); _2 = move _1; _3 = discriminant(_2); - _4 = _3 as u16 (IntToInt); - _5 = Le(_4, const 1_u16); + _4 = copy _3 as u16 (IntToInt); + _5 = Le(copy _4, const 1_u16); assume(move _5); _0 = move _3 as isize (IntToInt); StorageDead(_2); diff --git a/tests/mir-opt/building/enum_cast.offsetty.built.after.mir b/tests/mir-opt/building/enum_cast.offsetty.built.after.mir index 282859d7cd0..1c2acbe3023 100644 --- a/tests/mir-opt/building/enum_cast.offsetty.built.after.mir +++ b/tests/mir-opt/building/enum_cast.offsetty.built.after.mir @@ -14,9 +14,9 @@ fn offsetty(_1: NotStartingAtZero) -> u32 { StorageLive(_2); _2 = move _1; _3 = discriminant(_2); - _4 = _3 as u8 (IntToInt); - _5 = Ge(_4, const 4_u8); - _6 = Le(_4, const 8_u8); + _4 = copy _3 as u8 (IntToInt); + _5 = Ge(copy _4, const 4_u8); + _6 = Le(copy _4, const 8_u8); _7 = BitAnd(move _5, move _6); assume(move _7); _0 = move _3 as u32 (IntToInt); diff --git a/tests/mir-opt/building/enum_cast.signy.built.after.mir b/tests/mir-opt/building/enum_cast.signy.built.after.mir index a9f7d6c7800..39b6dfaf005 100644 --- a/tests/mir-opt/building/enum_cast.signy.built.after.mir +++ b/tests/mir-opt/building/enum_cast.signy.built.after.mir @@ -14,9 +14,9 @@ fn signy(_1: SignedAroundZero) -> i16 { StorageLive(_2); _2 = move _1; _3 = discriminant(_2); - _4 = _3 as u16 (IntToInt); - _5 = Ge(_4, const 65534_u16); - _6 = Le(_4, const 2_u16); + _4 = copy _3 as u16 (IntToInt); + _5 = Ge(copy _4, const 65534_u16); + _6 = Le(copy _4, const 2_u16); _7 = BitOr(move _5, move _6); assume(move _7); _0 = move _3 as i16 (IntToInt); diff --git a/tests/mir-opt/building/eq_never_type._f.built.after.mir b/tests/mir-opt/building/eq_never_type._f.built.after.mir index 39438258c2e..4711af46f1c 100644 --- a/tests/mir-opt/building/eq_never_type._f.built.after.mir +++ b/tests/mir-opt/building/eq_never_type._f.built.after.mir @@ -16,7 +16,7 @@ fn _f(_1: !, _2: !) -> () { StorageLive(_4); StorageLive(_5); StorageLive(_6); - _6 = _1; + _6 = copy _1; unreachable; } @@ -25,7 +25,7 @@ fn _f(_1: !, _2: !) -> () { StorageLive(_7); StorageLive(_8); StorageLive(_9); - _9 = _2; + _9 = copy _2; unreachable; } diff --git a/tests/mir-opt/building/issue_101867.main.built.after.mir b/tests/mir-opt/building/issue_101867.main.built.after.mir index 5c50b3db5ca..34e5bedf4ce 100644 --- a/tests/mir-opt/building/issue_101867.main.built.after.mir +++ b/tests/mir-opt/building/issue_101867.main.built.after.mir @@ -55,7 +55,7 @@ fn main() -> () { } bb6: { - _5 = ((_1 as Some).0: u8); + _5 = copy ((_1 as Some).0: u8); _0 = const (); StorageDead(_5); StorageDead(_1); diff --git a/tests/mir-opt/building/issue_49232.main.built.after.mir b/tests/mir-opt/building/issue_49232.main.built.after.mir index d09a1748a8b..b78f6691d54 100644 --- a/tests/mir-opt/building/issue_49232.main.built.after.mir +++ b/tests/mir-opt/building/issue_49232.main.built.after.mir @@ -25,7 +25,7 @@ fn main() -> () { StorageLive(_3); _3 = const true; PlaceMention(_3); - switchInt(_3) -> [0: bb4, otherwise: bb6]; + switchInt(copy _3) -> [0: bb4, otherwise: bb6]; } bb3: { diff --git a/tests/mir-opt/building/logical_or_in_conditional.test_complex.built.after.mir b/tests/mir-opt/building/logical_or_in_conditional.test_complex.built.after.mir index 3e16efe6980..72bd4605b26 100644 --- a/tests/mir-opt/building/logical_or_in_conditional.test_complex.built.after.mir +++ b/tests/mir-opt/building/logical_or_in_conditional.test_complex.built.after.mir @@ -54,7 +54,7 @@ fn test_complex() -> () { StorageLive(_6); StorageLive(_7); _7 = Droppy(const 0_u8); - _6 = (_7.0: u8); + _6 = copy (_7.0: u8); _5 = Gt(move _6, const 0_u8); switchInt(move _5) -> [0: bb10, otherwise: bb9]; } @@ -92,7 +92,7 @@ fn test_complex() -> () { StorageLive(_9); StorageLive(_10); _10 = Droppy(const 1_u8); - _9 = (_10.0: u8); + _9 = copy (_10.0: u8); _8 = Gt(move _9, const 1_u8); switchInt(move _8) -> [0: bb16, otherwise: bb15]; } diff --git a/tests/mir-opt/building/logical_or_in_conditional.test_or.built.after.mir b/tests/mir-opt/building/logical_or_in_conditional.test_or.built.after.mir index 3e7c116016c..2fc19e7e0fd 100644 --- a/tests/mir-opt/building/logical_or_in_conditional.test_or.built.after.mir +++ b/tests/mir-opt/building/logical_or_in_conditional.test_or.built.after.mir @@ -14,7 +14,7 @@ fn test_or() -> () { StorageLive(_2); StorageLive(_3); _3 = Droppy(const 0_u8); - _2 = (_3.0: u8); + _2 = copy (_3.0: u8); _1 = Gt(move _2, const 0_u8); switchInt(move _1) -> [0: bb2, otherwise: bb1]; } @@ -44,7 +44,7 @@ fn test_or() -> () { StorageLive(_5); StorageLive(_6); _6 = Droppy(const 1_u8); - _5 = (_6.0: u8); + _5 = copy (_6.0: u8); _4 = Gt(move _5, const 1_u8); switchInt(move _4) -> [0: bb7, otherwise: bb6]; } diff --git a/tests/mir-opt/building/match/deref-patterns/string.foo.PreCodegen.after.mir b/tests/mir-opt/building/match/deref-patterns/string.foo.PreCodegen.after.mir index 1e4f7485089..9f52a8cd1e5 100644 --- a/tests/mir-opt/building/match/deref-patterns/string.foo.PreCodegen.after.mir +++ b/tests/mir-opt/building/match/deref-patterns/string.foo.PreCodegen.after.mir @@ -26,7 +26,7 @@ fn foo(_1: Option<String>) -> i32 { } bb2: { - _6 = <str as PartialEq>::eq(_5, const "a") -> [return: bb3, unwind unreachable]; + _6 = <str as PartialEq>::eq(copy _5, const "a") -> [return: bb3, unwind unreachable]; } bb3: { @@ -52,7 +52,7 @@ fn foo(_1: Option<String>) -> i32 { } bb7: { - switchInt(_2) -> [0: bb9, otherwise: bb8]; + switchInt(copy _2) -> [0: bb9, otherwise: bb8]; } bb8: { diff --git a/tests/mir-opt/building/match/exponential_or.match_tuple.SimplifyCfg-initial.after.mir b/tests/mir-opt/building/match/exponential_or.match_tuple.SimplifyCfg-initial.after.mir index 596dcef85fd..d52241b459e 100644 --- a/tests/mir-opt/building/match/exponential_or.match_tuple.SimplifyCfg-initial.after.mir +++ b/tests/mir-opt/building/match/exponential_or.match_tuple.SimplifyCfg-initial.after.mir @@ -19,7 +19,7 @@ fn match_tuple(_1: (u32, bool, Option<i32>, u32)) -> u32 { bb0: { PlaceMention(_1); - switchInt((_1.0: u32)) -> [1: bb2, 4: bb2, otherwise: bb1]; + switchInt(copy (_1.0: u32)) -> [1: bb2, 4: bb2, otherwise: bb1]; } bb1: { @@ -33,26 +33,26 @@ fn match_tuple(_1: (u32, bool, Option<i32>, u32)) -> u32 { } bb3: { - switchInt((((_1.2: std::option::Option<i32>) as Some).0: i32)) -> [1: bb4, 8: bb4, otherwise: bb1]; + switchInt(copy (((_1.2: std::option::Option<i32>) as Some).0: i32)) -> [1: bb4, 8: bb4, otherwise: bb1]; } bb4: { - _5 = Le(const 6_u32, (_1.3: u32)); + _5 = Le(const 6_u32, copy (_1.3: u32)); switchInt(move _5) -> [0: bb5, otherwise: bb7]; } bb5: { - _3 = Le(const 13_u32, (_1.3: u32)); + _3 = Le(const 13_u32, copy (_1.3: u32)); switchInt(move _3) -> [0: bb1, otherwise: bb6]; } bb6: { - _4 = Le((_1.3: u32), const 16_u32); + _4 = Le(copy (_1.3: u32), const 16_u32); switchInt(move _4) -> [0: bb1, otherwise: bb8]; } bb7: { - _6 = Le((_1.3: u32), const 9_u32); + _6 = Le(copy (_1.3: u32), const 9_u32); switchInt(move _6) -> [0: bb5, otherwise: bb8]; } @@ -62,13 +62,13 @@ fn match_tuple(_1: (u32, bool, Option<i32>, u32)) -> u32 { bb9: { StorageLive(_7); - _7 = (_1.0: u32); + _7 = copy (_1.0: u32); StorageLive(_8); - _8 = (_1.3: u32); + _8 = copy (_1.3: u32); StorageLive(_9); - _9 = _7; + _9 = copy _7; StorageLive(_10); - _10 = _8; + _10 = copy _8; _0 = BitXor(move _9, move _10); StorageDead(_10); StorageDead(_9); diff --git a/tests/mir-opt/building/match/match_false_edges.full_tested_match.built.after.mir b/tests/mir-opt/building/match/match_false_edges.full_tested_match.built.after.mir index a93743edfac..4b0cdcfbb86 100644 --- a/tests/mir-opt/building/match/match_false_edges.full_tested_match.built.after.mir +++ b/tests/mir-opt/building/match/match_false_edges.full_tested_match.built.after.mir @@ -59,9 +59,9 @@ fn full_tested_match() -> () { bb7: { StorageLive(_9); - _9 = ((_2 as Some).0: i32); + _9 = copy ((_2 as Some).0: i32); StorageLive(_10); - _10 = _9; + _10 = copy _9; _1 = (const 2_i32, move _10); StorageDead(_10); StorageDead(_9); @@ -89,9 +89,9 @@ fn full_tested_match() -> () { FakeRead(ForMatchGuard, _3); FakeRead(ForGuardBinding, _6); StorageLive(_5); - _5 = ((_2 as Some).0: i32); + _5 = copy ((_2 as Some).0: i32); StorageLive(_8); - _8 = _5; + _8 = copy _5; _1 = (const 1_i32, move _8); StorageDead(_8); StorageDead(_5); diff --git a/tests/mir-opt/building/match/match_false_edges.full_tested_match2.built.after.mir b/tests/mir-opt/building/match/match_false_edges.full_tested_match2.built.after.mir index 0d0ea2be1b0..63ec71fdf51 100644 --- a/tests/mir-opt/building/match/match_false_edges.full_tested_match2.built.after.mir +++ b/tests/mir-opt/building/match/match_false_edges.full_tested_match2.built.after.mir @@ -42,9 +42,9 @@ fn full_tested_match2() -> () { bb3: { StorageLive(_9); - _9 = ((_2 as Some).0: i32); + _9 = copy ((_2 as Some).0: i32); StorageLive(_10); - _10 = _9; + _10 = copy _9; _1 = (const 2_i32, move _10); StorageDead(_10); StorageDead(_9); @@ -89,9 +89,9 @@ fn full_tested_match2() -> () { FakeRead(ForMatchGuard, _3); FakeRead(ForGuardBinding, _6); StorageLive(_5); - _5 = ((_2 as Some).0: i32); + _5 = copy ((_2 as Some).0: i32); StorageLive(_8); - _8 = _5; + _8 = copy _5; _1 = (const 1_i32, move _8); StorageDead(_8); StorageDead(_5); diff --git a/tests/mir-opt/building/match/match_false_edges.main.built.after.mir b/tests/mir-opt/building/match/match_false_edges.main.built.after.mir index 87b7e29848f..3b10adb499c 100644 --- a/tests/mir-opt/building/match/match_false_edges.main.built.after.mir +++ b/tests/mir-opt/building/match/match_false_edges.main.built.after.mir @@ -61,7 +61,7 @@ fn main() -> () { bb5: { StorageLive(_14); - _14 = _2; + _14 = copy _2; _1 = const 4_i32; StorageDead(_14); goto -> bb22; @@ -86,7 +86,7 @@ fn main() -> () { _3 = &fake shallow _2; StorageLive(_12); StorageLive(_13); - _13 = (*_11); + _13 = copy (*_11); _12 = guard2(move _13) -> [return: bb18, unwind: bb24]; } @@ -96,7 +96,7 @@ fn main() -> () { bb11: { StorageLive(_9); - _9 = _2; + _9 = copy _2; _1 = const 2_i32; StorageDead(_9); goto -> bb22; @@ -123,7 +123,7 @@ fn main() -> () { FakeRead(ForMatchGuard, _3); FakeRead(ForGuardBinding, _7); StorageLive(_6); - _6 = ((_2 as Some).0: i32); + _6 = copy ((_2 as Some).0: i32); _1 = const 1_i32; StorageDead(_6); StorageDead(_7); @@ -150,7 +150,7 @@ fn main() -> () { FakeRead(ForMatchGuard, _3); FakeRead(ForGuardBinding, _11); StorageLive(_10); - _10 = ((_2 as Some).0: i32); + _10 = copy ((_2 as Some).0: i32); _1 = const 3_i32; StorageDead(_10); StorageDead(_11); diff --git a/tests/mir-opt/building/match/simple_match.match_bool.built.after.mir b/tests/mir-opt/building/match/simple_match.match_bool.built.after.mir index b0ebdc37b06..0e82d9591a6 100644 --- a/tests/mir-opt/building/match/simple_match.match_bool.built.after.mir +++ b/tests/mir-opt/building/match/simple_match.match_bool.built.after.mir @@ -6,7 +6,7 @@ fn match_bool(_1: bool) -> usize { bb0: { PlaceMention(_1); - switchInt(_1) -> [0: bb1, otherwise: bb2]; + switchInt(copy _1) -> [0: bb1, otherwise: bb2]; } bb1: { diff --git a/tests/mir-opt/building/match/sort_candidates.constant_eq.SimplifyCfg-initial.after.mir b/tests/mir-opt/building/match/sort_candidates.constant_eq.SimplifyCfg-initial.after.mir index 2bce79a3ae7..b8f54fef0fa 100644 --- a/tests/mir-opt/building/match/sort_candidates.constant_eq.SimplifyCfg-initial.after.mir +++ b/tests/mir-opt/building/match/sort_candidates.constant_eq.SimplifyCfg-initial.after.mir @@ -16,18 +16,18 @@ fn constant_eq(_1: &str, _2: bool) -> u32 { bb0: { StorageLive(_3); StorageLive(_4); - _4 = _1; + _4 = copy _1; StorageLive(_5); - _5 = _2; + _5 = copy _2; _3 = (move _4, move _5); StorageDead(_5); StorageDead(_4); PlaceMention(_3); - _9 = <str as PartialEq>::eq((_3.0: &str), const "a") -> [return: bb9, unwind: bb19]; + _9 = <str as PartialEq>::eq(copy (_3.0: &str), const "a") -> [return: bb9, unwind: bb19]; } bb1: { - switchInt((_3.1: bool)) -> [0: bb10, otherwise: bb11]; + switchInt(copy (_3.1: bool)) -> [0: bb10, otherwise: bb11]; } bb2: { @@ -35,7 +35,7 @@ fn constant_eq(_1: &str, _2: bool) -> u32 { } bb3: { - switchInt((_3.1: bool)) -> [0: bb1, otherwise: bb4]; + switchInt(copy (_3.1: bool)) -> [0: bb1, otherwise: bb4]; } bb4: { @@ -43,11 +43,11 @@ fn constant_eq(_1: &str, _2: bool) -> u32 { } bb5: { - _8 = <str as PartialEq>::eq((_3.0: &str), const "b") -> [return: bb8, unwind: bb19]; + _8 = <str as PartialEq>::eq(copy (_3.0: &str), const "b") -> [return: bb8, unwind: bb19]; } bb6: { - switchInt((_3.1: bool)) -> [0: bb1, otherwise: bb7]; + switchInt(copy (_3.1: bool)) -> [0: bb1, otherwise: bb7]; } bb7: { diff --git a/tests/mir-opt/building/match/sort_candidates.disjoint_ranges.SimplifyCfg-initial.after.mir b/tests/mir-opt/building/match/sort_candidates.disjoint_ranges.SimplifyCfg-initial.after.mir index e521fb4509a..d6251680814 100644 --- a/tests/mir-opt/building/match/sort_candidates.disjoint_ranges.SimplifyCfg-initial.after.mir +++ b/tests/mir-opt/building/match/sort_candidates.disjoint_ranges.SimplifyCfg-initial.after.mir @@ -13,7 +13,7 @@ fn disjoint_ranges(_1: i32, _2: bool) -> u32 { bb0: { PlaceMention(_1); - _6 = Le(const 0_i32, _1); + _6 = Le(const 0_i32, copy _1); switchInt(move _6) -> [0: bb3, otherwise: bb8]; } @@ -27,7 +27,7 @@ fn disjoint_ranges(_1: i32, _2: bool) -> u32 { } bb3: { - _4 = Le(const 10_i32, _1); + _4 = Le(const 10_i32, copy _1); switchInt(move _4) -> [0: bb5, otherwise: bb7]; } @@ -36,7 +36,7 @@ fn disjoint_ranges(_1: i32, _2: bool) -> u32 { } bb5: { - switchInt(_1) -> [4294967295: bb6, otherwise: bb1]; + switchInt(copy _1) -> [4294967295: bb6, otherwise: bb1]; } bb6: { @@ -44,12 +44,12 @@ fn disjoint_ranges(_1: i32, _2: bool) -> u32 { } bb7: { - _5 = Le(_1, const 20_i32); + _5 = Le(copy _1, const 20_i32); switchInt(move _5) -> [0: bb5, otherwise: bb4]; } bb8: { - _7 = Lt(_1, const 10_i32); + _7 = Lt(copy _1, const 10_i32); switchInt(move _7) -> [0: bb3, otherwise: bb2]; } @@ -66,7 +66,7 @@ fn disjoint_ranges(_1: i32, _2: bool) -> u32 { bb11: { _3 = &fake shallow _1; StorageLive(_8); - _8 = _2; + _8 = copy _2; switchInt(move _8) -> [0: bb13, otherwise: bb12]; } diff --git a/tests/mir-opt/building/receiver_ptr_mutability.main.built.after.mir b/tests/mir-opt/building/receiver_ptr_mutability.main.built.after.mir index 1855bb0787d..296d71a319d 100644 --- a/tests/mir-opt/building/receiver_ptr_mutability.main.built.after.mir +++ b/tests/mir-opt/building/receiver_ptr_mutability.main.built.after.mir @@ -38,7 +38,7 @@ fn main() -> () { StorageLive(_2); StorageLive(_3); StorageLive(_4); - _4 = _1; + _4 = copy _1; _3 = move _4 as *const Test (PointerCoercion(MutToConstPointer)); StorageDead(_4); _2 = Test::x(move _3) -> [return: bb2, unwind: bb4]; @@ -63,7 +63,7 @@ fn main() -> () { StorageLive(_10); StorageLive(_11); StorageLive(_12); - _12 = (*(*(*(*_5)))); + _12 = copy (*(*(*(*_5)))); _11 = move _12 as *const Test (PointerCoercion(MutToConstPointer)); StorageDead(_12); _10 = Test::x(move _11) -> [return: bb3, unwind: bb4]; diff --git a/tests/mir-opt/building/shifts.shift_signed.built.after.mir b/tests/mir-opt/building/shifts.shift_signed.built.after.mir index 8706ee9d446..65e2db300cd 100644 --- a/tests/mir-opt/building/shifts.shift_signed.built.after.mir +++ b/tests/mir-opt/building/shifts.shift_signed.built.after.mir @@ -44,12 +44,12 @@ fn shift_signed(_1: i8, _2: u128, _3: i8, _4: i32, _5: i128) -> ([i8; 3], [u128; StorageLive(_6); StorageLive(_7); StorageLive(_8); - _8 = _1; + _8 = copy _1; StorageLive(_9); - _9 = _3; - _10 = _9 as u8 (IntToInt); + _9 = copy _3; + _10 = copy _9 as u8 (IntToInt); _11 = Lt(move _10, const 8_u8); - assert(move _11, "attempt to shift right by `{}`, which would overflow", _9) -> [success: bb1, unwind: bb7]; + assert(move _11, "attempt to shift right by `{}`, which would overflow", copy _9) -> [success: bb1, unwind: bb7]; } bb1: { @@ -58,12 +58,12 @@ fn shift_signed(_1: i8, _2: u128, _3: i8, _4: i32, _5: i128) -> ([i8; 3], [u128; StorageDead(_8); StorageLive(_12); StorageLive(_13); - _13 = _1; + _13 = copy _1; StorageLive(_14); - _14 = _4; - _15 = _14 as u32 (IntToInt); + _14 = copy _4; + _15 = copy _14 as u32 (IntToInt); _16 = Lt(move _15, const 8_u32); - assert(move _16, "attempt to shift right by `{}`, which would overflow", _14) -> [success: bb2, unwind: bb7]; + assert(move _16, "attempt to shift right by `{}`, which would overflow", copy _14) -> [success: bb2, unwind: bb7]; } bb2: { @@ -72,12 +72,12 @@ fn shift_signed(_1: i8, _2: u128, _3: i8, _4: i32, _5: i128) -> ([i8; 3], [u128; StorageDead(_13); StorageLive(_17); StorageLive(_18); - _18 = _1; + _18 = copy _1; StorageLive(_19); - _19 = _5; - _20 = _19 as u128 (IntToInt); + _19 = copy _5; + _20 = copy _19 as u128 (IntToInt); _21 = Lt(move _20, const 8_u128); - assert(move _21, "attempt to shift right by `{}`, which would overflow", _19) -> [success: bb3, unwind: bb7]; + assert(move _21, "attempt to shift right by `{}`, which would overflow", copy _19) -> [success: bb3, unwind: bb7]; } bb3: { @@ -91,12 +91,12 @@ fn shift_signed(_1: i8, _2: u128, _3: i8, _4: i32, _5: i128) -> ([i8; 3], [u128; StorageLive(_22); StorageLive(_23); StorageLive(_24); - _24 = _2; + _24 = copy _2; StorageLive(_25); - _25 = _3; - _26 = _25 as u8 (IntToInt); + _25 = copy _3; + _26 = copy _25 as u8 (IntToInt); _27 = Lt(move _26, const 128_u8); - assert(move _27, "attempt to shift left by `{}`, which would overflow", _25) -> [success: bb4, unwind: bb7]; + assert(move _27, "attempt to shift left by `{}`, which would overflow", copy _25) -> [success: bb4, unwind: bb7]; } bb4: { @@ -105,12 +105,12 @@ fn shift_signed(_1: i8, _2: u128, _3: i8, _4: i32, _5: i128) -> ([i8; 3], [u128; StorageDead(_24); StorageLive(_28); StorageLive(_29); - _29 = _2; + _29 = copy _2; StorageLive(_30); - _30 = _4; - _31 = _30 as u32 (IntToInt); + _30 = copy _4; + _31 = copy _30 as u32 (IntToInt); _32 = Lt(move _31, const 128_u32); - assert(move _32, "attempt to shift left by `{}`, which would overflow", _30) -> [success: bb5, unwind: bb7]; + assert(move _32, "attempt to shift left by `{}`, which would overflow", copy _30) -> [success: bb5, unwind: bb7]; } bb5: { @@ -119,12 +119,12 @@ fn shift_signed(_1: i8, _2: u128, _3: i8, _4: i32, _5: i128) -> ([i8; 3], [u128; StorageDead(_29); StorageLive(_33); StorageLive(_34); - _34 = _2; + _34 = copy _2; StorageLive(_35); - _35 = _5; - _36 = _35 as u128 (IntToInt); + _35 = copy _5; + _36 = copy _35 as u128 (IntToInt); _37 = Lt(move _36, const 128_u128); - assert(move _37, "attempt to shift left by `{}`, which would overflow", _35) -> [success: bb6, unwind: bb7]; + assert(move _37, "attempt to shift left by `{}`, which would overflow", copy _35) -> [success: bb6, unwind: bb7]; } bb6: { diff --git a/tests/mir-opt/building/shifts.shift_unsigned.built.after.mir b/tests/mir-opt/building/shifts.shift_unsigned.built.after.mir index dfd3b5b35ad..62536833e49 100644 --- a/tests/mir-opt/building/shifts.shift_unsigned.built.after.mir +++ b/tests/mir-opt/building/shifts.shift_unsigned.built.after.mir @@ -38,11 +38,11 @@ fn shift_unsigned(_1: u8, _2: i128, _3: u8, _4: u32, _5: u128) -> ([u8; 3], [i12 StorageLive(_6); StorageLive(_7); StorageLive(_8); - _8 = _1; + _8 = copy _1; StorageLive(_9); - _9 = _3; - _10 = Lt(_9, const 8_u8); - assert(move _10, "attempt to shift right by `{}`, which would overflow", _9) -> [success: bb1, unwind: bb7]; + _9 = copy _3; + _10 = Lt(copy _9, const 8_u8); + assert(move _10, "attempt to shift right by `{}`, which would overflow", copy _9) -> [success: bb1, unwind: bb7]; } bb1: { @@ -51,11 +51,11 @@ fn shift_unsigned(_1: u8, _2: i128, _3: u8, _4: u32, _5: u128) -> ([u8; 3], [i12 StorageDead(_8); StorageLive(_11); StorageLive(_12); - _12 = _1; + _12 = copy _1; StorageLive(_13); - _13 = _4; - _14 = Lt(_13, const 8_u32); - assert(move _14, "attempt to shift right by `{}`, which would overflow", _13) -> [success: bb2, unwind: bb7]; + _13 = copy _4; + _14 = Lt(copy _13, const 8_u32); + assert(move _14, "attempt to shift right by `{}`, which would overflow", copy _13) -> [success: bb2, unwind: bb7]; } bb2: { @@ -64,11 +64,11 @@ fn shift_unsigned(_1: u8, _2: i128, _3: u8, _4: u32, _5: u128) -> ([u8; 3], [i12 StorageDead(_12); StorageLive(_15); StorageLive(_16); - _16 = _1; + _16 = copy _1; StorageLive(_17); - _17 = _5; - _18 = Lt(_17, const 8_u128); - assert(move _18, "attempt to shift right by `{}`, which would overflow", _17) -> [success: bb3, unwind: bb7]; + _17 = copy _5; + _18 = Lt(copy _17, const 8_u128); + assert(move _18, "attempt to shift right by `{}`, which would overflow", copy _17) -> [success: bb3, unwind: bb7]; } bb3: { @@ -82,11 +82,11 @@ fn shift_unsigned(_1: u8, _2: i128, _3: u8, _4: u32, _5: u128) -> ([u8; 3], [i12 StorageLive(_19); StorageLive(_20); StorageLive(_21); - _21 = _2; + _21 = copy _2; StorageLive(_22); - _22 = _3; - _23 = Lt(_22, const 128_u8); - assert(move _23, "attempt to shift left by `{}`, which would overflow", _22) -> [success: bb4, unwind: bb7]; + _22 = copy _3; + _23 = Lt(copy _22, const 128_u8); + assert(move _23, "attempt to shift left by `{}`, which would overflow", copy _22) -> [success: bb4, unwind: bb7]; } bb4: { @@ -95,11 +95,11 @@ fn shift_unsigned(_1: u8, _2: i128, _3: u8, _4: u32, _5: u128) -> ([u8; 3], [i12 StorageDead(_21); StorageLive(_24); StorageLive(_25); - _25 = _2; + _25 = copy _2; StorageLive(_26); - _26 = _4; - _27 = Lt(_26, const 128_u32); - assert(move _27, "attempt to shift left by `{}`, which would overflow", _26) -> [success: bb5, unwind: bb7]; + _26 = copy _4; + _27 = Lt(copy _26, const 128_u32); + assert(move _27, "attempt to shift left by `{}`, which would overflow", copy _26) -> [success: bb5, unwind: bb7]; } bb5: { @@ -108,11 +108,11 @@ fn shift_unsigned(_1: u8, _2: i128, _3: u8, _4: u32, _5: u128) -> ([u8; 3], [i12 StorageDead(_25); StorageLive(_28); StorageLive(_29); - _29 = _2; + _29 = copy _2; StorageLive(_30); - _30 = _5; - _31 = Lt(_30, const 128_u128); - assert(move _31, "attempt to shift left by `{}`, which would overflow", _30) -> [success: bb6, unwind: bb7]; + _30 = copy _5; + _31 = Lt(copy _30, const 128_u128); + assert(move _31, "attempt to shift left by `{}`, which would overflow", copy _30) -> [success: bb6, unwind: bb7]; } bb6: { diff --git a/tests/mir-opt/building/while_storage.while_loop.PreCodegen.after.panic-abort.mir b/tests/mir-opt/building/while_storage.while_loop.PreCodegen.after.panic-abort.mir index 26c82edf2d5..44a8b7342b2 100644 --- a/tests/mir-opt/building/while_storage.while_loop.PreCodegen.after.panic-abort.mir +++ b/tests/mir-opt/building/while_storage.while_loop.PreCodegen.after.panic-abort.mir @@ -20,7 +20,7 @@ fn while_loop(_1: bool) -> () { bb1: { StorageLive(_3); StorageLive(_2); - _2 = _1; + _2 = copy _1; _3 = get_bool(move _2) -> [return: bb2, unwind unreachable]; } @@ -40,7 +40,7 @@ fn while_loop(_1: bool) -> () { StorageDead(_2); StorageLive(_5); StorageLive(_4); - _4 = _1; + _4 = copy _1; _5 = get_bool(move _4) -> [return: bb5, unwind unreachable]; } diff --git a/tests/mir-opt/building/while_storage.while_loop.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/building/while_storage.while_loop.PreCodegen.after.panic-unwind.mir index 1bb72074846..9a640300674 100644 --- a/tests/mir-opt/building/while_storage.while_loop.PreCodegen.after.panic-unwind.mir +++ b/tests/mir-opt/building/while_storage.while_loop.PreCodegen.after.panic-unwind.mir @@ -20,7 +20,7 @@ fn while_loop(_1: bool) -> () { bb1: { StorageLive(_3); StorageLive(_2); - _2 = _1; + _2 = copy _1; _3 = get_bool(move _2) -> [return: bb2, unwind continue]; } @@ -40,7 +40,7 @@ fn while_loop(_1: bool) -> () { StorageDead(_2); StorageLive(_5); StorageLive(_4); - _4 = _1; + _4 = copy _1; _5 = get_bool(move _4) -> [return: bb5, unwind continue]; } |
