Skip to content

Commit 6bc0771

Browse files
committed
trivial test blessings
1 parent 47008d7 commit 6bc0771

10 files changed

+60
-63
lines changed

tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.32bit.diff

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,16 @@
112112
StorageDead(_10);
113113
StorageLive(_14);
114114
_14 = const {ALLOC0: &&SmallStruct};
115-
_31 = deref_copy (*_14);
115+
_31 = copy (*_14);
116116
StorageLive(_11);
117-
_32 = deref_copy (*_14);
117+
_32 = copy (*_14);
118118
- _11 = copy ((*_32).0: f32);
119119
+ _11 = const 9f32;
120120
StorageLive(_12);
121-
_33 = deref_copy (*_14);
121+
_33 = copy (*_14);
122122
_12 = copy ((*_33).1: std::option::Option<S>);
123123
StorageLive(_13);
124-
_34 = deref_copy (*_14);
124+
_34 = copy (*_14);
125125
_13 = copy ((*_34).2: &[f32]);
126126
StorageDead(_14);
127127
StorageLive(_15);
@@ -149,16 +149,16 @@
149149
StorageDead(_22);
150150
StorageLive(_26);
151151
_26 = const {ALLOC1: &&BigStruct};
152-
_35 = deref_copy (*_26);
152+
_35 = copy (*_26);
153153
StorageLive(_23);
154-
_36 = deref_copy (*_26);
154+
_36 = copy (*_26);
155155
- _23 = copy ((*_36).0: f32);
156156
+ _23 = const 82f32;
157157
StorageLive(_24);
158-
_37 = deref_copy (*_26);
158+
_37 = copy (*_26);
159159
_24 = copy ((*_37).1: std::option::Option<S>);
160160
StorageLive(_25);
161-
_38 = deref_copy (*_26);
161+
_38 = copy (*_26);
162162
_25 = copy ((*_38).2: &[f32]);
163163
StorageDead(_26);
164164
StorageLive(_27);

tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.64bit.diff

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,16 @@
112112
StorageDead(_10);
113113
StorageLive(_14);
114114
_14 = const {ALLOC0: &&SmallStruct};
115-
_31 = deref_copy (*_14);
115+
_31 = copy (*_14);
116116
StorageLive(_11);
117-
_32 = deref_copy (*_14);
117+
_32 = copy (*_14);
118118
- _11 = copy ((*_32).0: f32);
119119
+ _11 = const 9f32;
120120
StorageLive(_12);
121-
_33 = deref_copy (*_14);
121+
_33 = copy (*_14);
122122
_12 = copy ((*_33).1: std::option::Option<S>);
123123
StorageLive(_13);
124-
_34 = deref_copy (*_14);
124+
_34 = copy (*_14);
125125
_13 = copy ((*_34).2: &[f32]);
126126
StorageDead(_14);
127127
StorageLive(_15);
@@ -149,16 +149,16 @@
149149
StorageDead(_22);
150150
StorageLive(_26);
151151
_26 = const {ALLOC1: &&BigStruct};
152-
_35 = deref_copy (*_26);
152+
_35 = copy (*_26);
153153
StorageLive(_23);
154-
_36 = deref_copy (*_26);
154+
_36 = copy (*_26);
155155
- _23 = copy ((*_36).0: f32);
156156
+ _23 = const 82f32;
157157
StorageLive(_24);
158-
_37 = deref_copy (*_26);
158+
_37 = copy (*_26);
159159
_24 = copy ((*_37).1: std::option::Option<S>);
160160
StorageLive(_25);
161-
_38 = deref_copy (*_26);
161+
_38 = copy (*_26);
162162
_25 = copy ((*_38).2: &[f32]);
163163
StorageDead(_26);
164164
StorageLive(_27);

tests/mir-opt/early_otherwise_branch_68867.try_sum.EarlyOtherwiseBranch.diff

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
_4 = (move _5, move _6);
7777
StorageDead(_6);
7878
StorageDead(_5);
79-
_34 = deref_copy (_4.0: &ViewportPercentageLength);
79+
_34 = copy (_4.0: &ViewportPercentageLength);
8080
_11 = discriminant((*_34));
8181
switchInt(move _11) -> [0: bb2, 1: bb3, 2: bb4, 3: bb5, otherwise: bb12];
8282
}
@@ -92,35 +92,35 @@
9292
}
9393

9494
bb2: {
95-
_35 = deref_copy (_4.1: &ViewportPercentageLength);
95+
_35 = copy (_4.1: &ViewportPercentageLength);
9696
_7 = discriminant((*_35));
9797
switchInt(move _7) -> [0: bb9, otherwise: bb1];
9898
}
9999

100100
bb3: {
101-
_36 = deref_copy (_4.1: &ViewportPercentageLength);
101+
_36 = copy (_4.1: &ViewportPercentageLength);
102102
_8 = discriminant((*_36));
103103
switchInt(move _8) -> [1: bb8, otherwise: bb1];
104104
}
105105

106106
bb4: {
107-
_37 = deref_copy (_4.1: &ViewportPercentageLength);
107+
_37 = copy (_4.1: &ViewportPercentageLength);
108108
_9 = discriminant((*_37));
109109
switchInt(move _9) -> [2: bb7, otherwise: bb1];
110110
}
111111

112112
bb5: {
113-
_38 = deref_copy (_4.1: &ViewportPercentageLength);
113+
_38 = copy (_4.1: &ViewportPercentageLength);
114114
_10 = discriminant((*_38));
115115
switchInt(move _10) -> [3: bb6, otherwise: bb1];
116116
}
117117

118118
bb6: {
119119
StorageLive(_27);
120-
_39 = deref_copy (_4.0: &ViewportPercentageLength);
120+
_39 = copy (_4.0: &ViewportPercentageLength);
121121
_27 = copy (((*_39) as Vmax).0: f32);
122122
StorageLive(_28);
123-
_40 = deref_copy (_4.1: &ViewportPercentageLength);
123+
_40 = copy (_4.1: &ViewportPercentageLength);
124124
_28 = copy (((*_40) as Vmax).0: f32);
125125
StorageLive(_29);
126126
StorageLive(_30);
@@ -139,10 +139,10 @@
139139

140140
bb7: {
141141
StorageLive(_22);
142-
_41 = deref_copy (_4.0: &ViewportPercentageLength);
142+
_41 = copy (_4.0: &ViewportPercentageLength);
143143
_22 = copy (((*_41) as Vmin).0: f32);
144144
StorageLive(_23);
145-
_42 = deref_copy (_4.1: &ViewportPercentageLength);
145+
_42 = copy (_4.1: &ViewportPercentageLength);
146146
_23 = copy (((*_42) as Vmin).0: f32);
147147
StorageLive(_24);
148148
StorageLive(_25);
@@ -161,10 +161,10 @@
161161

162162
bb8: {
163163
StorageLive(_17);
164-
_43 = deref_copy (_4.0: &ViewportPercentageLength);
164+
_43 = copy (_4.0: &ViewportPercentageLength);
165165
_17 = copy (((*_43) as Vh).0: f32);
166166
StorageLive(_18);
167-
_44 = deref_copy (_4.1: &ViewportPercentageLength);
167+
_44 = copy (_4.1: &ViewportPercentageLength);
168168
_18 = copy (((*_44) as Vh).0: f32);
169169
StorageLive(_19);
170170
StorageLive(_20);
@@ -183,10 +183,10 @@
183183

184184
bb9: {
185185
StorageLive(_12);
186-
_45 = deref_copy (_4.0: &ViewportPercentageLength);
186+
_45 = copy (_4.0: &ViewportPercentageLength);
187187
_12 = copy (((*_45) as Vw).0: f32);
188188
StorageLive(_13);
189-
_46 = deref_copy (_4.1: &ViewportPercentageLength);
189+
_46 = copy (_4.1: &ViewportPercentageLength);
190190
_13 = copy (((*_46) as Vw).0: f32);
191191
StorageLive(_14);
192192
StorageLive(_15);

tests/mir-opt/early_otherwise_branch_soundness.no_downcast.EarlyOtherwiseBranch.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717

1818
bb1: {
19-
_4 = deref_copy (((*_1) as Some).0: &E<'_>);
19+
_4 = copy (((*_1) as Some).0: &E<'_>);
2020
_2 = discriminant((*_4));
2121
switchInt(move _2) -> [1: bb2, 0: bb3, otherwise: bb5];
2222
}

tests/mir-opt/gvn_copy_aggregate.all_copy_2.GVN.diff

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,14 @@
2525

2626
bb0: {
2727
- StorageLive(_2);
28-
- _8 = deref_copy (*_1);
2928
+ nop;
30-
+ _8 = copy (*_1);
29+
_8 = copy (*_1);
3130
_2 = copy ((*_8).0: i32);
3231
- StorageLive(_3);
33-
- _9 = deref_copy (*_1);
32+
- _9 = copy (*_1);
3433
- _3 = copy ((*_9).1: u64);
3534
- StorageLive(_4);
36-
- _10 = deref_copy (*_1);
35+
- _10 = copy (*_1);
3736
- _4 = copy ((*_10).2: [i8; 3]);
3837
+ nop;
3938
+ _9 = copy _8;

tests/mir-opt/inline_coroutine_body.run2-{closure#0}.Inline.panic-unwind.diff

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
StorageLive(_8);
129129
_8 = move _4;
130130
StorageLive(_9);
131-
_10 = deref_copy (_1.1: &mut std::task::Context<'_>);
131+
_10 = copy (_1.1: &mut std::task::Context<'_>);
132132
_9 = &mut (*_10);
133133
- _7 = <{async fn body of ActionPermit<'_, T>::perform()} as Future>::poll(move _8, move _9) -> [return: bb3, unwind: bb5];
134134
+ StorageLive(_11);
@@ -148,7 +148,7 @@
148148
+ StorageLive(_39);
149149
+ StorageLive(_40);
150150
+ StorageLive(_41);
151-
+ _32 = deref_copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
151+
+ _32 = copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
152152
+ _31 = discriminant((*_32));
153153
+ switchInt(move _31) -> [0: bb5, 1: bb15, 2: bb14, 3: bb13, otherwise: bb7];
154154
}
@@ -200,8 +200,8 @@
200200
- StorageDead(_2);
201201
- return;
202202
+ bb5: {
203-
+ _33 = deref_copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
204-
+ _34 = deref_copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
203+
+ _33 = copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
204+
+ _34 = copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
205205
+ (((*_33) as variant#3).0: ActionPermit<'_, T>) = move ((*_34).0: ActionPermit<'_, T>);
206206
+ StorageLive(_12);
207207
+ StorageLive(_13);
@@ -214,7 +214,7 @@
214214
+ StorageDead(_14);
215215
+ _12 = move _13;
216216
+ StorageDead(_13);
217-
+ _35 = deref_copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
217+
+ _35 = copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
218218
+ (((*_35) as variant#3).1: std::future::Ready<()>) = move _12;
219219
+ goto -> bb6;
220220
}
@@ -227,7 +227,7 @@
227227
+ StorageLive(_19);
228228
+ StorageLive(_20);
229229
+ StorageLive(_21);
230-
+ _36 = deref_copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
230+
+ _36 = copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
231231
+ _21 = &mut (((*_36) as variant#3).1: std::future::Ready<()>);
232232
+ _20 = &mut (*_21);
233233
+ _19 = Pin::<&mut std::future::Ready<()>> { pointer: copy _20 };
@@ -281,7 +281,7 @@
281281
+ StorageDead(_12);
282282
+ StorageDead(_28);
283283
+ StorageDead(_29);
284-
+ _37 = deref_copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
284+
+ _37 = copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
285285
+ discriminant((*_37)) = 3;
286286
+ goto -> bb4;
287287
+ }
@@ -296,13 +296,13 @@
296296
+ StorageDead(_18);
297297
+ StorageDead(_17);
298298
+ StorageDead(_12);
299-
+ _38 = deref_copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
299+
+ _38 = copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
300300
+ drop((((*_38) as variant#3).0: ActionPermit<'_, T>)) -> [return: bb10, unwind: bb12];
301301
+ }
302302
+
303303
+ bb10: {
304304
+ _7 = Poll::<()>::Ready(move _30);
305-
+ _39 = deref_copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
305+
+ _39 = copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
306306
+ discriminant((*_39)) = 1;
307307
+ goto -> bb4;
308308
+ }
@@ -315,12 +315,12 @@
315315
+ StorageDead(_18);
316316
+ StorageDead(_17);
317317
+ StorageDead(_12);
318-
+ _40 = deref_copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
318+
+ _40 = copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
319319
+ drop((((*_40) as variant#3).0: ActionPermit<'_, T>)) -> [return: bb12, unwind terminate(cleanup)];
320320
+ }
321321
+
322322
+ bb12 (cleanup): {
323-
+ _41 = deref_copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
323+
+ _41 = copy (_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()});
324324
+ discriminant((*_41)) = 2;
325325
+ goto -> bb2;
326326
+ }

tests/mir-opt/pre-codegen/deref_nested_borrows.src.GVN.panic-unwind.diff

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,15 @@
1616

1717
bb0: {
1818
- StorageLive(_2);
19-
- _6 = deref_copy (*_1);
2019
+ nop;
21-
+ _6 = copy (*_1);
20+
_6 = copy (*_1);
2221
_2 = copy (*_6);
2322
_3 = unknown() -> [return: bb1, unwind continue];
2423
}
2524

2625
bb1: {
2726
StorageLive(_4);
28-
- _7 = deref_copy (*_1);
29-
+ _7 = copy (*_1);
27+
_7 = copy (*_1);
3028
_4 = copy (*_7);
3129
StorageLive(_5);
3230
_5 = copy _2;

tests/mir-opt/retag.box_to_raw_mut.SimplifyCfg-pre-optimizations.after.panic-unwind.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fn box_to_raw_mut(_1: &mut Box<i32>) -> *mut i32 {
88

99
bb0: {
1010
Retag([fn entry] _1);
11-
_2 = deref_copy (*_1);
11+
_2 = copy (*_1);
1212
_3 = copy ((_2.0: std::ptr::Unique<i32>).0: std::ptr::NonNull<i32>) as *const i32 (Transmute);
1313
_0 = &raw mut (*_3);
1414
Retag([raw] _0);

tests/mir-opt/sroa/lifetimes.foo.ScalarReplacementOfAggregates.diff

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@
117117
StorageLive(_15);
118118
StorageLive(_16);
119119
StorageLive(_17);
120-
- _26 = deref_copy (_12.0: &std::boxed::Box<dyn std::fmt::Display>);
121-
+ _26 = deref_copy _34;
120+
- _26 = copy (_12.0: &std::boxed::Box<dyn std::fmt::Display>);
121+
+ _26 = copy _34;
122122
_17 = &(*_26);
123123
_16 = core::fmt::rt::Argument::<'_>::new_display::<Box<dyn std::fmt::Display>>(move _17) -> [return: bb3, unwind unreachable];
124124
}
@@ -127,8 +127,8 @@
127127
StorageDead(_17);
128128
StorageLive(_18);
129129
StorageLive(_19);
130-
- _27 = deref_copy (_12.1: &u32);
131-
+ _27 = deref_copy _35;
130+
- _27 = copy (_12.1: &u32);
131+
+ _27 = copy _35;
132132
_19 = &(*_27);
133133
_18 = core::fmt::rt::Argument::<'_>::new_display::<u32>(move _19) -> [return: bb4, unwind unreachable];
134134
}

tests/ui/rustc_public-ir-print/async-closure.stdout

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ fn foo::{closure#0}(_1: &{async closure@$DIR/async-closure.rs:9:13: 9:21}) -> {a
2828
debug y => (*((*_1).0: &i32));
2929
bb0: {
3030
StorageLive(_2);
31-
_3 = CopyForDeref(((*_1).0: &i32));
31+
_3 = ((*_1).0: &i32);
3232
_2 = &(*_3);
3333
_0 = {coroutine@$DIR/async-closure.rs:9:22: 11:6}(move _2);
3434
StorageDead(_2);
@@ -48,19 +48,19 @@ fn foo::{closure#0}::{closure#0}(_1: Pin<&mut {async closure body@$DIR/async-clo
4848
debug y => (*((*(_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6})).0: &i32));
4949
debug y => _3;
5050
bb0: {
51-
_7 = CopyForDeref((_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6}));
51+
_7 = (_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6});
5252
_6 = discriminant((*_7));
5353
switchInt(move _6) -> [0: bb1, 1: bb2, otherwise: bb3];
5454
}
5555
bb1: {
5656
StorageLive(_3);
57-
_8 = CopyForDeref((_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6}));
58-
_4 = CopyForDeref(((*_8).0: &i32));
57+
_8 = (_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6});
58+
_4 = ((*_8).0: &i32);
5959
_3 = (*_4);
6060
_5 = ();
6161
StorageDead(_3);
6262
_0 = std::task::Poll::Ready(move _5);
63-
_9 = CopyForDeref((_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6}));
63+
_9 = (_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6});
6464
discriminant((*_9)) = 1;
6565
return;
6666
}
@@ -84,19 +84,19 @@ fn foo::{closure#0}::{synthetic#0}(_1: Pin<&mut {async closure body@$DIR/async-c
8484
debug y => (*((*(_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6})).0: &i32));
8585
debug y => _3;
8686
bb0: {
87-
_7 = CopyForDeref((_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6}));
87+
_7 = (_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6});
8888
_6 = discriminant((*_7));
8989
switchInt(move _6) -> [0: bb1, 1: bb2, otherwise: bb3];
9090
}
9191
bb1: {
9292
StorageLive(_3);
93-
_8 = CopyForDeref((_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6}));
94-
_4 = CopyForDeref(((*_8).0: &i32));
93+
_8 = (_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6});
94+
_4 = ((*_8).0: &i32);
9595
_3 = (*_4);
9696
_5 = ();
9797
StorageDead(_3);
9898
_0 = std::task::Poll::Ready(move _5);
99-
_9 = CopyForDeref((_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6}));
99+
_9 = (_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6});
100100
discriminant((*_9)) = 1;
101101
return;
102102
}

0 commit comments

Comments
 (0)