Skip to content

Commit d62b097

Browse files
committed
fix mir-opt test
1 parent 4fb6c6e commit d62b097

5 files changed

+13
-12
lines changed

tests/mir-opt/slice_filter.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(ref_binop_on_copy_type)]
12
fn main() {
23
let input = vec![];
34
let _variant_a_result = variant_a(&input);

tests/mir-opt/slice_filter.variant_a-{closure#0}.CopyProp.diff

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- // MIR for `variant_a::{closure#0}` before CopyProp
22
+ // MIR for `variant_a::{closure#0}` after CopyProp
33

4-
fn variant_a::{closure#0}(_1: &mut [closure@$DIR/slice_filter.rs:8:25: 8:39], _2: &&(usize, usize, usize, usize)) -> bool {
4+
fn variant_a::{closure#0}(_1: &mut [closure@$DIR/slice_filter.rs:9:25: 9:39], _2: &&(usize, usize, usize, usize)) -> bool {
55
let mut _0: bool; // return place in scope 0 at $DIR/slice_filter.rs:+0:40: +0:40
66
let _3: &usize; // in scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
77
let _4: &usize; // in scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
@@ -42,7 +42,7 @@
4242
debug b => _4; // in scope 1 at $DIR/slice_filter.rs:+0:30: +0:31
4343
debug c => _5; // in scope 1 at $DIR/slice_filter.rs:+0:33: +0:34
4444
debug d => _6; // in scope 1 at $DIR/slice_filter.rs:+0:36: +0:37
45-
scope 2 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:40: 8:46
45+
scope 2 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:9:40: 9:46
4646
debug self => _9; // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
4747
debug other => _10; // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
4848
let mut _29: &usize; // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
@@ -56,7 +56,7 @@
5656
let mut _34: usize; // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
5757
}
5858
}
59-
scope 4 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:60: 8:66
59+
scope 4 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:9:60: 9:66
6060
debug self => _18; // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
6161
debug other => _19; // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
6262
let mut _35: &usize; // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
@@ -70,7 +70,7 @@
7070
let mut _40: usize; // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
7171
}
7272
}
73-
scope 6 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:50: 8:56
73+
scope 6 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:9:50: 9:56
7474
debug self => _13; // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
7575
debug other => _14; // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
7676
let mut _41: &usize; // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
@@ -84,7 +84,7 @@
8484
let mut _46: usize; // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
8585
}
8686
}
87-
scope 8 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:70: 8:76
87+
scope 8 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:9:70: 9:76
8888
debug self => _22; // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
8989
debug other => _23; // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
9090
let mut _47: &usize; // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL

tests/mir-opt/slice_filter.variant_a-{closure#0}.DestinationPropagation.diff

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- // MIR for `variant_a::{closure#0}` before DestinationPropagation
22
+ // MIR for `variant_a::{closure#0}` after DestinationPropagation
33

4-
fn variant_a::{closure#0}(_1: &mut [closure@$DIR/slice_filter.rs:8:25: 8:39], _2: &&(usize, usize, usize, usize)) -> bool {
4+
fn variant_a::{closure#0}(_1: &mut [closure@$DIR/slice_filter.rs:9:25: 9:39], _2: &&(usize, usize, usize, usize)) -> bool {
55
let mut _0: bool; // return place in scope 0 at $DIR/slice_filter.rs:+0:40: +0:40
66
let _3: &usize; // in scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
77
let _4: &usize; // in scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
@@ -34,7 +34,7 @@
3434
debug b => _4; // in scope 1 at $DIR/slice_filter.rs:+0:30: +0:31
3535
debug c => _5; // in scope 1 at $DIR/slice_filter.rs:+0:33: +0:34
3636
debug d => _6; // in scope 1 at $DIR/slice_filter.rs:+0:36: +0:37
37-
scope 2 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:40: 8:46
37+
scope 2 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:9:40: 9:46
3838
debug self => _9; // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
3939
debug other => _10; // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
4040
let mut _29: &usize; // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
@@ -46,7 +46,7 @@
4646
let mut _32: usize; // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
4747
}
4848
}
49-
scope 4 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:60: 8:66
49+
scope 4 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:9:60: 9:66
5050
debug self => _18; // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
5151
debug other => _19; // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
5252
let mut _33: &usize; // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
@@ -58,7 +58,7 @@
5858
let mut _36: usize; // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
5959
}
6060
}
61-
scope 6 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:50: 8:56
61+
scope 6 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:9:50: 9:56
6262
debug self => _13; // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
6363
debug other => _14; // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
6464
let mut _37: &usize; // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
@@ -70,7 +70,7 @@
7070
let mut _40: usize; // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
7171
}
7272
}
73-
scope 8 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:70: 8:76
73+
scope 8 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:9:70: 9:76
7474
debug self => _22; // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
7575
debug other => _23; // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
7676
let mut _41: &usize; // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL

tests/mir-opt/slice_filter.variant_b-{closure#0}.CopyProp.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- // MIR for `variant_b::{closure#0}` before CopyProp
22
+ // MIR for `variant_b::{closure#0}` after CopyProp
33

4-
fn variant_b::{closure#0}(_1: &mut [closure@$DIR/slice_filter.rs:12:25: 12:41], _2: &&(usize, usize, usize, usize)) -> bool {
4+
fn variant_b::{closure#0}(_1: &mut [closure@$DIR/slice_filter.rs:13:25: 13:41], _2: &&(usize, usize, usize, usize)) -> bool {
55
let mut _0: bool; // return place in scope 0 at $DIR/slice_filter.rs:+0:42: +0:42
66
let _3: usize; // in scope 0 at $DIR/slice_filter.rs:+0:29: +0:30
77
let _4: usize; // in scope 0 at $DIR/slice_filter.rs:+0:32: +0:33

tests/mir-opt/slice_filter.variant_b-{closure#0}.DestinationPropagation.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- // MIR for `variant_b::{closure#0}` before DestinationPropagation
22
+ // MIR for `variant_b::{closure#0}` after DestinationPropagation
33

4-
fn variant_b::{closure#0}(_1: &mut [closure@$DIR/slice_filter.rs:12:25: 12:41], _2: &&(usize, usize, usize, usize)) -> bool {
4+
fn variant_b::{closure#0}(_1: &mut [closure@$DIR/slice_filter.rs:13:25: 13:41], _2: &&(usize, usize, usize, usize)) -> bool {
55
let mut _0: bool; // return place in scope 0 at $DIR/slice_filter.rs:+0:42: +0:42
66
let _3: usize; // in scope 0 at $DIR/slice_filter.rs:+0:29: +0:30
77
let _4: usize; // in scope 0 at $DIR/slice_filter.rs:+0:32: +0:33

0 commit comments

Comments
 (0)