1
- //@ test-mir-pass: SingleUseConsts
1
+ //@ test-mir-pass: SingleUseConsts-initial
2
2
//@ compile-flags: -C debuginfo=full
3
3
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
4
4
@@ -7,14 +7,14 @@ trait MyTrait {
7
7
const ASSOC_INT : i32 ;
8
8
}
9
9
10
- // EMIT_MIR single_use_consts.if_const.SingleUseConsts.diff
10
+ // EMIT_MIR single_use_consts.if_const.SingleUseConsts-initial .diff
11
11
fn if_const < T : MyTrait > ( ) -> i32 {
12
12
// CHECK-LABEL: fn if_const(
13
13
// CHECK: switchInt(const <T as MyTrait>::ASSOC_BOOL)
14
14
if T :: ASSOC_BOOL { 7 } else { 42 }
15
15
}
16
16
17
- // EMIT_MIR single_use_consts.match_const.SingleUseConsts.diff
17
+ // EMIT_MIR single_use_consts.match_const.SingleUseConsts-initial .diff
18
18
fn match_const < T : MyTrait > ( ) -> & ' static str {
19
19
// CHECK-LABEL: fn match_const(
20
20
// CHECK: switchInt(const <T as MyTrait>::ASSOC_INT)
@@ -25,7 +25,7 @@ fn match_const<T: MyTrait>() -> &'static str {
25
25
}
26
26
}
27
27
28
- // EMIT_MIR single_use_consts.if_const_debug.SingleUseConsts.diff
28
+ // EMIT_MIR single_use_consts.if_const_debug.SingleUseConsts-initial .diff
29
29
fn if_const_debug < T : MyTrait > ( ) -> i32 {
30
30
// CHECK-LABEL: fn if_const_debug(
31
31
// CHECK: my_bool => const <T as MyTrait>::ASSOC_BOOL;
@@ -37,7 +37,7 @@ fn if_const_debug<T: MyTrait>() -> i32 {
37
37
if my_bool { 7 } else { 42 }
38
38
}
39
39
40
- // EMIT_MIR single_use_consts.match_const_debug.SingleUseConsts.diff
40
+ // EMIT_MIR single_use_consts.match_const_debug.SingleUseConsts-initial .diff
41
41
fn match_const_debug < T : MyTrait > ( ) -> & ' static str {
42
42
// CHECK-LABEL: fn match_const_debug(
43
43
// CHECK: my_int => const <T as MyTrait>::ASSOC_INT;
@@ -51,7 +51,7 @@ fn match_const_debug<T: MyTrait>() -> &'static str {
51
51
}
52
52
}
53
53
54
- // EMIT_MIR single_use_consts.never_used_debug.SingleUseConsts.diff
54
+ // EMIT_MIR single_use_consts.never_used_debug.SingleUseConsts-initial .diff
55
55
#[ allow( unused_variables) ]
56
56
fn never_used_debug < T : MyTrait > ( ) {
57
57
// CHECK-LABEL: fn never_used_debug(
@@ -62,14 +62,14 @@ fn never_used_debug<T: MyTrait>() {
62
62
let my_int = T :: ASSOC_INT ;
63
63
}
64
64
65
- // EMIT_MIR single_use_consts.assign_const_to_return.SingleUseConsts.diff
65
+ // EMIT_MIR single_use_consts.assign_const_to_return.SingleUseConsts-initial .diff
66
66
fn assign_const_to_return < T : MyTrait > ( ) -> bool {
67
67
// CHECK-LABEL: fn assign_const_to_return(
68
68
// CHECK: _0 = const <T as MyTrait>::ASSOC_BOOL;
69
69
T :: ASSOC_BOOL
70
70
}
71
71
72
- // EMIT_MIR single_use_consts.keep_parameter.SingleUseConsts.diff
72
+ // EMIT_MIR single_use_consts.keep_parameter.SingleUseConsts-initial .diff
73
73
fn keep_parameter < T : MyTrait > ( mut other : i32 ) {
74
74
// CHECK-LABEL: fn keep_parameter(
75
75
// CHECK: _1 = const <T as MyTrait>::ASSOC_INT;
0 commit comments