6
6
// rev3 and make sure that the hash has not changed.
7
7
8
8
// build-pass (FIXME(62277): could be check-pass?)
9
- // revisions: cfail1 cfail2 cfail3
10
- // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans
9
+ // revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6
10
+ // compile-flags: -Z query-dep-graph
11
+ // [cfail1]compile-flags: -Zincremental-ignore-spans
12
+ // [cfail2]compile-flags: -Zincremental-ignore-spans
13
+ // [cfail3]compile-flags: -Zincremental-ignore-spans
14
+ // [cfail4]compile-flags: -Zincremental-relative-spans
15
+ // [cfail5]compile-flags: -Zincremental-relative-spans
16
+ // [cfail6]compile-flags: -Zincremental-relative-spans
11
17
12
18
13
19
#![ allow( warnings) ]
@@ -19,29 +25,33 @@ fn callee2(_x: u32, _y: i64) {}
19
25
20
26
21
27
// Change Callee (Function)
22
- #[ cfg( cfail1) ]
28
+ #[ cfg( any ( cfail1, cfail4 ) ) ]
23
29
pub fn change_callee_function ( ) {
24
30
callee1 ( 1 , 2 )
25
31
}
26
32
27
- #[ cfg( not( cfail1) ) ]
33
+ #[ cfg( not( any ( cfail1, cfail4 ) ) ) ]
28
34
#[ rustc_clean( cfg="cfail2" , except="hir_owner_nodes,optimized_mir,typeck" ) ]
29
35
#[ rustc_clean( cfg="cfail3" ) ]
36
+ #[ rustc_clean( cfg="cfail5" , except="hir_owner_nodes,optimized_mir,typeck" ) ]
37
+ #[ rustc_clean( cfg="cfail6" ) ]
30
38
pub fn change_callee_function ( ) {
31
39
callee2 ( 1 , 2 )
32
40
}
33
41
34
42
35
43
36
44
// Change Argument (Function)
37
- #[ cfg( cfail1) ]
45
+ #[ cfg( any ( cfail1, cfail4 ) ) ]
38
46
pub fn change_argument_function ( ) {
39
47
callee1 ( 1 , 2 )
40
48
}
41
49
42
- #[ cfg( not( cfail1) ) ]
50
+ #[ cfg( not( any ( cfail1, cfail4 ) ) ) ]
43
51
#[ rustc_clean( cfg="cfail2" , except="hir_owner_nodes,optimized_mir" ) ]
44
52
#[ rustc_clean( cfg="cfail3" ) ]
53
+ #[ rustc_clean( cfg="cfail5" , except="hir_owner_nodes,optimized_mir" ) ]
54
+ #[ rustc_clean( cfg="cfail6" ) ]
45
55
pub fn change_argument_function ( ) {
46
56
callee1 ( 1 , 3 )
47
57
}
@@ -50,13 +60,15 @@ pub fn change_argument_function() {
50
60
51
61
// Change Callee Indirectly (Function)
52
62
mod change_callee_indirectly_function {
53
- #[ cfg( cfail1) ]
63
+ #[ cfg( any ( cfail1, cfail4 ) ) ]
54
64
use super :: callee1 as callee;
55
- #[ cfg( not( cfail1) ) ]
65
+ #[ cfg( not( any ( cfail1, cfail4 ) ) ) ]
56
66
use super :: callee2 as callee;
57
67
58
68
#[ rustc_clean( except="hir_owner_nodes,typeck" , cfg="cfail2" ) ]
59
69
#[ rustc_clean( cfg="cfail3" ) ]
70
+ #[ rustc_clean( except="hir_owner_nodes,typeck" , cfg="cfail5" ) ]
71
+ #[ rustc_clean( cfg="cfail6" ) ]
60
72
pub fn change_callee_indirectly_function ( ) {
61
73
callee ( 1 , 2 )
62
74
}
@@ -70,15 +82,17 @@ impl Struct {
70
82
}
71
83
72
84
// Change Callee (Method)
73
- #[ cfg( cfail1) ]
85
+ #[ cfg( any ( cfail1, cfail4 ) ) ]
74
86
pub fn change_callee_method ( ) {
75
87
let s = Struct ;
76
88
s. method1 ( 'x' , true ) ;
77
89
}
78
90
79
- #[ cfg( not( cfail1) ) ]
91
+ #[ cfg( not( any ( cfail1, cfail4 ) ) ) ]
80
92
#[ rustc_clean( cfg="cfail2" , except="hir_owner_nodes,optimized_mir,typeck" ) ]
81
93
#[ rustc_clean( cfg="cfail3" ) ]
94
+ #[ rustc_clean( cfg="cfail5" , except="hir_owner_nodes,optimized_mir,typeck" ) ]
95
+ #[ rustc_clean( cfg="cfail6" ) ]
82
96
pub fn change_callee_method ( ) {
83
97
let s = Struct ;
84
98
s. method2 ( 'x' , true ) ;
@@ -87,15 +101,17 @@ pub fn change_callee_method() {
87
101
88
102
89
103
// Change Argument (Method)
90
- #[ cfg( cfail1) ]
104
+ #[ cfg( any ( cfail1, cfail4 ) ) ]
91
105
pub fn change_argument_method ( ) {
92
106
let s = Struct ;
93
107
s. method1 ( 'x' , true ) ;
94
108
}
95
109
96
- #[ cfg( not( cfail1) ) ]
110
+ #[ cfg( not( any ( cfail1, cfail4 ) ) ) ]
97
111
#[ rustc_clean( cfg="cfail2" , except="hir_owner_nodes,optimized_mir" ) ]
98
112
#[ rustc_clean( cfg="cfail3" ) ]
113
+ #[ rustc_clean( cfg="cfail5" , except="hir_owner_nodes,optimized_mir" ) ]
114
+ #[ rustc_clean( cfg="cfail6" ) ]
99
115
pub fn change_argument_method ( ) {
100
116
let s = Struct ;
101
117
s. method1 ( 'y' , true ) ;
@@ -104,15 +120,17 @@ pub fn change_argument_method() {
104
120
105
121
106
122
// Change Callee (Method, UFCS)
107
- #[ cfg( cfail1) ]
123
+ #[ cfg( any ( cfail1, cfail4 ) ) ]
108
124
pub fn change_ufcs_callee_method ( ) {
109
125
let s = Struct ;
110
126
Struct :: method1 ( & s, 'x' , true ) ;
111
127
}
112
128
113
- #[ cfg( not( cfail1) ) ]
129
+ #[ cfg( not( any ( cfail1, cfail4 ) ) ) ]
114
130
#[ rustc_clean( cfg="cfail2" , except="hir_owner_nodes,optimized_mir,typeck" ) ]
115
131
#[ rustc_clean( cfg="cfail3" ) ]
132
+ #[ rustc_clean( cfg="cfail5" , except="hir_owner_nodes,optimized_mir,typeck" ) ]
133
+ #[ rustc_clean( cfg="cfail6" ) ]
116
134
pub fn change_ufcs_callee_method ( ) {
117
135
let s = Struct ;
118
136
Struct :: method2 ( & s, 'x' , true ) ;
@@ -121,32 +139,36 @@ pub fn change_ufcs_callee_method() {
121
139
122
140
123
141
// Change Argument (Method, UFCS)
124
- #[ cfg( cfail1) ]
142
+ #[ cfg( any ( cfail1, cfail4 ) ) ]
125
143
pub fn change_argument_method_ufcs ( ) {
126
144
let s = Struct ;
127
145
Struct :: method1 ( & s, 'x' , true ) ;
128
146
}
129
147
130
- #[ cfg( not( cfail1) ) ]
148
+ #[ cfg( not( any ( cfail1, cfail4 ) ) ) ]
131
149
#[ rustc_clean( cfg="cfail2" , except="hir_owner_nodes,optimized_mir" ) ]
132
150
#[ rustc_clean( cfg="cfail3" ) ]
151
+ #[ rustc_clean( cfg="cfail5" , except="hir_owner_nodes,optimized_mir" ) ]
152
+ #[ rustc_clean( cfg="cfail6" ) ]
133
153
pub fn change_argument_method_ufcs ( ) {
134
154
let s = Struct ;
135
- Struct :: method1 ( & s, 'x' , false ) ;
155
+ Struct :: method1 ( & s, 'x' , false ) ;
136
156
}
137
157
138
158
139
159
140
160
// Change To UFCS
141
- #[ cfg( cfail1) ]
161
+ #[ cfg( any ( cfail1, cfail4 ) ) ]
142
162
pub fn change_to_ufcs ( ) {
143
163
let s = Struct ;
144
- s. method1 ( 'x' , true ) ;
164
+ s. method1 ( 'x' , true ) ; // ------
145
165
}
146
166
147
- #[ cfg( not( cfail1) ) ]
167
+ #[ cfg( not( any ( cfail1, cfail4 ) ) ) ]
148
168
#[ rustc_clean( cfg="cfail2" , except="hir_owner_nodes,optimized_mir,typeck" ) ]
149
169
#[ rustc_clean( cfg="cfail3" ) ]
170
+ #[ rustc_clean( cfg="cfail5" , except="hir_owner_nodes,optimized_mir,typeck" ) ]
171
+ #[ rustc_clean( cfg="cfail6" ) ]
150
172
// One might think this would be expanded in the hir_owner_nodes/Mir, but it actually
151
173
// results in slightly different hir_owner/Mir.
152
174
pub fn change_to_ufcs ( ) {
@@ -162,15 +184,15 @@ impl Struct2 {
162
184
163
185
// Change UFCS Callee Indirectly
164
186
pub mod change_ufcs_callee_indirectly {
165
- #[ cfg( cfail1) ]
187
+ #[ cfg( any ( cfail1, cfail4 ) ) ]
166
188
use super :: Struct as Struct ;
167
- #[ cfg( not( cfail1) ) ]
189
+ #[ cfg( not( any ( cfail1, cfail4 ) ) ) ]
168
190
use super :: Struct2 as Struct ;
169
191
170
192
#[ rustc_clean( cfg="cfail2" , except="hir_owner_nodes,optimized_mir,typeck" ) ]
171
193
#[ rustc_clean( cfg="cfail3" ) ]
172
-
173
-
194
+ # [ rustc_clean ( cfg= "cfail5" , except= "hir_owner_nodes,optimized_mir,typeck" ) ]
195
+ # [ rustc_clean ( cfg= "cfail6" ) ]
174
196
pub fn change_ufcs_callee_indirectly ( ) {
175
197
let s = Struct ;
176
198
Struct :: method1 ( & s, 'q' , false )
0 commit comments