66// rev3 and make sure that the hash has not changed.
77
88// 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
1117
1218
1319#![ allow( warnings) ]
@@ -19,29 +25,33 @@ fn callee2(_x: u32, _y: i64) {}
1925
2026
2127// Change Callee (Function)
22- #[ cfg( cfail1) ]
28+ #[ cfg( any ( cfail1, cfail4 ) ) ]
2329pub fn change_callee_function ( ) {
2430 callee1 ( 1 , 2 )
2531}
2632
27- #[ cfg( not( cfail1) ) ]
33+ #[ cfg( not( any ( cfail1, cfail4 ) ) ) ]
2834#[ rustc_clean( cfg="cfail2" , except="hir_owner_nodes,optimized_mir,typeck" ) ]
2935#[ rustc_clean( cfg="cfail3" ) ]
36+ #[ rustc_clean( cfg="cfail5" , except="hir_owner_nodes,optimized_mir,typeck" ) ]
37+ #[ rustc_clean( cfg="cfail6" ) ]
3038pub fn change_callee_function ( ) {
3139 callee2 ( 1 , 2 )
3240}
3341
3442
3543
3644// Change Argument (Function)
37- #[ cfg( cfail1) ]
45+ #[ cfg( any ( cfail1, cfail4 ) ) ]
3846pub fn change_argument_function ( ) {
3947 callee1 ( 1 , 2 )
4048}
4149
42- #[ cfg( not( cfail1) ) ]
50+ #[ cfg( not( any ( cfail1, cfail4 ) ) ) ]
4351#[ rustc_clean( cfg="cfail2" , except="hir_owner_nodes,optimized_mir" ) ]
4452#[ rustc_clean( cfg="cfail3" ) ]
53+ #[ rustc_clean( cfg="cfail5" , except="hir_owner_nodes,optimized_mir" ) ]
54+ #[ rustc_clean( cfg="cfail6" ) ]
4555pub fn change_argument_function ( ) {
4656 callee1 ( 1 , 3 )
4757}
@@ -50,13 +60,15 @@ pub fn change_argument_function() {
5060
5161// Change Callee Indirectly (Function)
5262mod change_callee_indirectly_function {
53- #[ cfg( cfail1) ]
63+ #[ cfg( any ( cfail1, cfail4 ) ) ]
5464 use super :: callee1 as callee;
55- #[ cfg( not( cfail1) ) ]
65+ #[ cfg( not( any ( cfail1, cfail4 ) ) ) ]
5666 use super :: callee2 as callee;
5767
5868 #[ rustc_clean( except="hir_owner_nodes,typeck" , cfg="cfail2" ) ]
5969 #[ rustc_clean( cfg="cfail3" ) ]
70+ #[ rustc_clean( except="hir_owner_nodes,typeck" , cfg="cfail5" ) ]
71+ #[ rustc_clean( cfg="cfail6" ) ]
6072 pub fn change_callee_indirectly_function ( ) {
6173 callee ( 1 , 2 )
6274 }
@@ -70,15 +82,17 @@ impl Struct {
7082}
7183
7284// Change Callee (Method)
73- #[ cfg( cfail1) ]
85+ #[ cfg( any ( cfail1, cfail4 ) ) ]
7486pub fn change_callee_method ( ) {
7587 let s = Struct ;
7688 s. method1 ( 'x' , true ) ;
7789}
7890
79- #[ cfg( not( cfail1) ) ]
91+ #[ cfg( not( any ( cfail1, cfail4 ) ) ) ]
8092#[ rustc_clean( cfg="cfail2" , except="hir_owner_nodes,optimized_mir,typeck" ) ]
8193#[ rustc_clean( cfg="cfail3" ) ]
94+ #[ rustc_clean( cfg="cfail5" , except="hir_owner_nodes,optimized_mir,typeck" ) ]
95+ #[ rustc_clean( cfg="cfail6" ) ]
8296pub fn change_callee_method ( ) {
8397 let s = Struct ;
8498 s. method2 ( 'x' , true ) ;
@@ -87,15 +101,17 @@ pub fn change_callee_method() {
87101
88102
89103// Change Argument (Method)
90- #[ cfg( cfail1) ]
104+ #[ cfg( any ( cfail1, cfail4 ) ) ]
91105pub fn change_argument_method ( ) {
92106 let s = Struct ;
93107 s. method1 ( 'x' , true ) ;
94108}
95109
96- #[ cfg( not( cfail1) ) ]
110+ #[ cfg( not( any ( cfail1, cfail4 ) ) ) ]
97111#[ rustc_clean( cfg="cfail2" , except="hir_owner_nodes,optimized_mir" ) ]
98112#[ rustc_clean( cfg="cfail3" ) ]
113+ #[ rustc_clean( cfg="cfail5" , except="hir_owner_nodes,optimized_mir" ) ]
114+ #[ rustc_clean( cfg="cfail6" ) ]
99115pub fn change_argument_method ( ) {
100116 let s = Struct ;
101117 s. method1 ( 'y' , true ) ;
@@ -104,15 +120,17 @@ pub fn change_argument_method() {
104120
105121
106122// Change Callee (Method, UFCS)
107- #[ cfg( cfail1) ]
123+ #[ cfg( any ( cfail1, cfail4 ) ) ]
108124pub fn change_ufcs_callee_method ( ) {
109125 let s = Struct ;
110126 Struct :: method1 ( & s, 'x' , true ) ;
111127}
112128
113- #[ cfg( not( cfail1) ) ]
129+ #[ cfg( not( any ( cfail1, cfail4 ) ) ) ]
114130#[ rustc_clean( cfg="cfail2" , except="hir_owner_nodes,optimized_mir,typeck" ) ]
115131#[ rustc_clean( cfg="cfail3" ) ]
132+ #[ rustc_clean( cfg="cfail5" , except="hir_owner_nodes,optimized_mir,typeck" ) ]
133+ #[ rustc_clean( cfg="cfail6" ) ]
116134pub fn change_ufcs_callee_method ( ) {
117135 let s = Struct ;
118136 Struct :: method2 ( & s, 'x' , true ) ;
@@ -121,32 +139,36 @@ pub fn change_ufcs_callee_method() {
121139
122140
123141// Change Argument (Method, UFCS)
124- #[ cfg( cfail1) ]
142+ #[ cfg( any ( cfail1, cfail4 ) ) ]
125143pub fn change_argument_method_ufcs ( ) {
126144 let s = Struct ;
127145 Struct :: method1 ( & s, 'x' , true ) ;
128146}
129147
130- #[ cfg( not( cfail1) ) ]
148+ #[ cfg( not( any ( cfail1, cfail4 ) ) ) ]
131149#[ rustc_clean( cfg="cfail2" , except="hir_owner_nodes,optimized_mir" ) ]
132150#[ rustc_clean( cfg="cfail3" ) ]
151+ #[ rustc_clean( cfg="cfail5" , except="hir_owner_nodes,optimized_mir" ) ]
152+ #[ rustc_clean( cfg="cfail6" ) ]
133153pub fn change_argument_method_ufcs ( ) {
134154 let s = Struct ;
135- Struct :: method1 ( & s, 'x' , false ) ;
155+ Struct :: method1 ( & s, 'x' , false ) ;
136156}
137157
138158
139159
140160// Change To UFCS
141- #[ cfg( cfail1) ]
161+ #[ cfg( any ( cfail1, cfail4 ) ) ]
142162pub fn change_to_ufcs ( ) {
143163 let s = Struct ;
144- s. method1 ( 'x' , true ) ;
164+ s. method1 ( 'x' , true ) ; // ------
145165}
146166
147- #[ cfg( not( cfail1) ) ]
167+ #[ cfg( not( any ( cfail1, cfail4 ) ) ) ]
148168#[ rustc_clean( cfg="cfail2" , except="hir_owner_nodes,optimized_mir,typeck" ) ]
149169#[ rustc_clean( cfg="cfail3" ) ]
170+ #[ rustc_clean( cfg="cfail5" , except="hir_owner_nodes,optimized_mir,typeck" ) ]
171+ #[ rustc_clean( cfg="cfail6" ) ]
150172// One might think this would be expanded in the hir_owner_nodes/Mir, but it actually
151173// results in slightly different hir_owner/Mir.
152174pub fn change_to_ufcs ( ) {
@@ -162,15 +184,15 @@ impl Struct2 {
162184
163185// Change UFCS Callee Indirectly
164186pub mod change_ufcs_callee_indirectly {
165- #[ cfg( cfail1) ]
187+ #[ cfg( any ( cfail1, cfail4 ) ) ]
166188 use super :: Struct as Struct ;
167- #[ cfg( not( cfail1) ) ]
189+ #[ cfg( not( any ( cfail1, cfail4 ) ) ) ]
168190 use super :: Struct2 as Struct ;
169191
170192 #[ rustc_clean( cfg="cfail2" , except="hir_owner_nodes,optimized_mir,typeck" ) ]
171193 #[ rustc_clean( cfg="cfail3" ) ]
172-
173-
194+ # [ rustc_clean ( cfg= "cfail5" , except= "hir_owner_nodes,optimized_mir,typeck" ) ]
195+ # [ rustc_clean ( cfg= "cfail6" ) ]
174196 pub fn change_ufcs_callee_indirectly ( ) {
175197 let s = Struct ;
176198 Struct :: method1 ( & s, 'q' , false )
0 commit comments