9
9
// revisions: cfail1 cfail2 cfail3
10
10
// compile-flags: -Z query-dep-graph -Zincremental-ignore-spans
11
11
12
-
13
12
#![ allow( warnings) ]
14
13
#![ feature( linkage) ]
15
14
#![ feature( rustc_attrs) ]
16
15
#![ crate_type = "rlib" ]
17
16
18
-
19
17
// Add Parameter ---------------------------------------------------------------
20
18
21
19
#[ cfg( cfail1) ]
22
20
pub fn add_parameter ( ) { }
23
21
24
22
#[ cfg( not( cfail1) ) ]
25
- #[ rustc_clean( cfg = "cfail2" ,
26
- except = "hir_owner, hir_owner_items, mir_built, optimized_mir, typeck_tables_of, fn_sig" ) ]
23
+ #[ rustc_clean(
24
+ cfg = "cfail2" ,
25
+ except = "hir_owner, hir_owner_items, mir_built, optimized_mir, typeck_tables_of, fn_sig"
26
+ ) ]
27
27
#[ rustc_clean( cfg = "cfail3" ) ]
28
28
pub fn add_parameter ( p : i32 ) { }
29
29
30
-
31
30
// Add Return Type -------------------------------------------------------------
32
31
33
32
#[ cfg( cfail1) ]
@@ -38,55 +37,58 @@ pub fn add_return_type() {}
38
37
#[ rustc_clean( cfg = "cfail3" ) ]
39
38
pub fn add_return_type ( ) -> ( ) { }
40
39
41
-
42
40
// Change Parameter Type -------------------------------------------------------
43
41
44
42
#[ cfg( cfail1) ]
45
43
pub fn type_of_parameter ( p : i32 ) { }
46
44
47
45
#[ cfg( not( cfail1) ) ]
48
- #[ rustc_clean( cfg = "cfail2" ,
49
- except = "hir_owner, hir_owner_items, mir_built, optimized_mir, typeck_tables_of, fn_sig" ) ]
46
+ #[ rustc_clean(
47
+ cfg = "cfail2" ,
48
+ except = "hir_owner, hir_owner_items, mir_built, optimized_mir, typeck_tables_of, fn_sig"
49
+ ) ]
50
50
#[ rustc_clean( cfg = "cfail3" ) ]
51
51
pub fn type_of_parameter ( p : i64 ) { }
52
52
53
-
54
53
// Change Parameter Type Reference ---------------------------------------------
55
54
56
55
#[ cfg( cfail1) ]
57
56
pub fn type_of_parameter_ref ( p : & i32 ) { }
58
57
59
58
#[ cfg( not( cfail1) ) ]
60
- #[ rustc_clean( cfg = "cfail2" ,
61
- except = "hir_owner, hir_owner_items, mir_built, optimized_mir, typeck_tables_of, fn_sig" ) ]
59
+ #[ rustc_clean(
60
+ cfg = "cfail2" ,
61
+ except = "hir_owner, hir_owner_items, mir_built, optimized_mir, typeck_tables_of, fn_sig"
62
+ ) ]
62
63
#[ rustc_clean( cfg = "cfail3" ) ]
63
64
pub fn type_of_parameter_ref ( p : & mut i32 ) { }
64
65
65
-
66
66
// Change Parameter Order ------------------------------------------------------
67
67
68
68
#[ cfg( cfail1) ]
69
69
pub fn order_of_parameters ( p1 : i32 , p2 : i64 ) { }
70
70
71
71
#[ cfg( not( cfail1) ) ]
72
- #[ rustc_clean( cfg = "cfail2" ,
73
- except = "hir_owner, hir_owner_items, mir_built, optimized_mir, typeck_tables_of, fn_sig" ) ]
72
+ #[ rustc_clean(
73
+ cfg = "cfail2" ,
74
+ except = "hir_owner, hir_owner_items, mir_built, optimized_mir, typeck_tables_of, fn_sig"
75
+ ) ]
74
76
#[ rustc_clean( cfg = "cfail3" ) ]
75
77
pub fn order_of_parameters ( p2 : i64 , p1 : i32 ) { }
76
78
77
-
78
79
// Unsafe ----------------------------------------------------------------------
79
80
80
81
#[ cfg( cfail1) ]
81
82
pub fn make_unsafe ( ) { }
82
83
83
84
#[ cfg( not( cfail1) ) ]
84
- #[ rustc_clean( cfg = "cfail2" ,
85
- except = "hir_owner, hir_owner_items, mir_built, optimized_mir, typeck_tables_of, fn_sig" ) ]
85
+ #[ rustc_clean(
86
+ cfg = "cfail2" ,
87
+ except = "hir_owner, hir_owner_items, mir_built, optimized_mir, typeck_tables_of, fn_sig"
88
+ ) ]
86
89
#[ rustc_clean( cfg = "cfail3" ) ]
87
90
pub unsafe fn make_unsafe ( ) { }
88
91
89
-
90
92
// Extern ----------------------------------------------------------------------
91
93
92
94
#[ cfg( cfail1) ]
@@ -97,19 +99,19 @@ pub fn make_extern() {}
97
99
#[ rustc_clean( cfg = "cfail3" ) ]
98
100
pub extern "C" fn make_extern ( ) { }
99
101
100
-
101
102
// Type Parameter --------------------------------------------------------------
102
103
103
104
#[ cfg( cfail1) ]
104
105
pub fn type_parameter ( ) { }
105
106
106
107
#[ cfg( not( cfail1) ) ]
107
- #[ rustc_clean( cfg = "cfail2" ,
108
- except = "hir_owner, hir_owner_items, generics_of, type_of, predicates_of" ) ]
108
+ #[ rustc_clean(
109
+ cfg = "cfail2" ,
110
+ except = "hir_owner, hir_owner_items, generics_of, type_of, predicates_of"
111
+ ) ]
109
112
#[ rustc_clean( cfg = "cfail3" ) ]
110
113
pub fn type_parameter < T > ( ) { }
111
114
112
-
113
115
// Lifetime Parameter ----------------------------------------------------------
114
116
115
117
#[ cfg( cfail1) ]
@@ -120,7 +122,6 @@ pub fn lifetime_parameter() {}
120
122
#[ rustc_clean( cfg = "cfail3" ) ]
121
123
pub fn lifetime_parameter < ' a > ( ) { }
122
124
123
-
124
125
// Trait Bound -----------------------------------------------------------------
125
126
126
127
#[ cfg( cfail1) ]
@@ -131,7 +132,6 @@ pub fn trait_bound<T>() {}
131
132
#[ rustc_clean( cfg = "cfail3" ) ]
132
133
pub fn trait_bound < T : Eq > ( ) { }
133
134
134
-
135
135
// Builtin Bound ---------------------------------------------------------------
136
136
137
137
#[ cfg( cfail1) ]
@@ -142,19 +142,19 @@ pub fn builtin_bound<T>() {}
142
142
#[ rustc_clean( cfg = "cfail3" ) ]
143
143
pub fn builtin_bound < T : Send > ( ) { }
144
144
145
-
146
145
// Lifetime Bound --------------------------------------------------------------
147
146
148
147
#[ cfg( cfail1) ]
149
148
pub fn lifetime_bound < ' a , T > ( ) { }
150
149
151
150
#[ cfg( not( cfail1) ) ]
152
- #[ rustc_clean( cfg = "cfail2" ,
153
- except = "hir_owner, hir_owner_items, generics_of, type_of, predicates_of" ) ]
151
+ #[ rustc_clean(
152
+ cfg = "cfail2" ,
153
+ except = "hir_owner, hir_owner_items, generics_of, type_of, predicates_of"
154
+ ) ]
154
155
#[ rustc_clean( cfg = "cfail3" ) ]
155
156
pub fn lifetime_bound < ' a , T : ' a > ( ) { }
156
157
157
-
158
158
// Second Trait Bound ----------------------------------------------------------
159
159
160
160
#[ cfg( cfail1) ]
@@ -165,7 +165,6 @@ pub fn second_trait_bound<T: Eq>() {}
165
165
#[ rustc_clean( cfg = "cfail3" ) ]
166
166
pub fn second_trait_bound < T : Eq + Clone > ( ) { }
167
167
168
-
169
168
// Second Builtin Bound --------------------------------------------------------
170
169
171
170
#[ cfg( cfail1) ]
@@ -176,19 +175,19 @@ pub fn second_builtin_bound<T: Send>() {}
176
175
#[ rustc_clean( cfg = "cfail3" ) ]
177
176
pub fn second_builtin_bound < T : Send + Sized > ( ) { }
178
177
179
-
180
178
// Second Lifetime Bound -------------------------------------------------------
181
179
182
180
#[ cfg( cfail1) ]
183
181
pub fn second_lifetime_bound < ' a , ' b , T : ' a > ( ) { }
184
182
185
183
#[ cfg( not( cfail1) ) ]
186
- #[ rustc_clean( cfg = "cfail2" ,
187
- except = "hir_owner, hir_owner_items, generics_of, type_of, predicates_of" ) ]
184
+ #[ rustc_clean(
185
+ cfg = "cfail2" ,
186
+ except = "hir_owner, hir_owner_items, generics_of, type_of, predicates_of"
187
+ ) ]
188
188
#[ rustc_clean( cfg = "cfail3" ) ]
189
189
pub fn second_lifetime_bound < ' a , ' b , T : ' a + ' b > ( ) { }
190
190
191
-
192
191
// Inline ----------------------------------------------------------------------
193
192
194
193
#[ cfg( cfail1) ]
@@ -200,7 +199,6 @@ pub fn inline() {}
200
199
#[ inline]
201
200
pub fn inline ( ) { }
202
201
203
-
204
202
// Inline Never ----------------------------------------------------------------
205
203
206
204
#[ cfg( cfail1) ]
@@ -213,7 +211,6 @@ pub fn inline_never() {}
213
211
#[ inline( never) ]
214
212
pub fn inline_never ( ) { }
215
213
216
-
217
214
// No Mangle -------------------------------------------------------------------
218
215
219
216
#[ cfg( cfail1) ]
@@ -225,7 +222,6 @@ pub fn no_mangle() {}
225
222
#[ no_mangle]
226
223
pub fn no_mangle ( ) { }
227
224
228
-
229
225
// Linkage ---------------------------------------------------------------------
230
226
231
227
#[ cfg( cfail1) ]
@@ -237,7 +233,6 @@ pub fn linkage() {}
237
233
#[ linkage = "weak_odr" ]
238
234
pub fn linkage ( ) { }
239
235
240
-
241
236
// Return Impl Trait -----------------------------------------------------------
242
237
243
238
#[ cfg( cfail1) ]
@@ -252,7 +247,6 @@ pub fn return_impl_trait() -> impl Clone {
252
247
0
253
248
}
254
249
255
-
256
250
// Change Return Impl Trait ----------------------------------------------------
257
251
258
252
#[ cfg( cfail1) ]
@@ -267,7 +261,6 @@ pub fn change_return_impl_trait() -> impl Copy {
267
261
0u32
268
262
}
269
263
270
-
271
264
// Change Return Type Indirectly -----------------------------------------------
272
265
273
266
pub struct ReferencedType1 ;
@@ -279,15 +272,16 @@ pub mod change_return_type_indirectly {
279
272
#[ cfg( not( cfail1) ) ]
280
273
use super :: ReferencedType2 as ReturnType ;
281
274
282
- #[ rustc_clean( cfg = "cfail2" ,
283
- except = "hir_owner, hir_owner_items, mir_built, optimized_mir, typeck_tables_of, fn_sig" ) ]
275
+ #[ rustc_clean(
276
+ cfg = "cfail2" ,
277
+ except = "hir_owner, hir_owner_items, mir_built, optimized_mir, typeck_tables_of, fn_sig"
278
+ ) ]
284
279
#[ rustc_clean( cfg = "cfail3" ) ]
285
280
pub fn indirect_return_type ( ) -> ReturnType {
286
281
ReturnType { }
287
282
}
288
283
}
289
284
290
-
291
285
// Change Parameter Type Indirectly --------------------------------------------
292
286
293
287
pub mod change_parameter_type_indirectly {
@@ -296,13 +290,14 @@ pub mod change_parameter_type_indirectly {
296
290
#[ cfg( not( cfail1) ) ]
297
291
use super :: ReferencedType2 as ParameterType ;
298
292
299
- #[ rustc_clean( cfg = "cfail2" ,
300
- except = "hir_owner, hir_owner_items, mir_built, optimized_mir, typeck_tables_of, fn_sig" ) ]
293
+ #[ rustc_clean(
294
+ cfg = "cfail2" ,
295
+ except = "hir_owner, hir_owner_items, mir_built, optimized_mir, typeck_tables_of, fn_sig"
296
+ ) ]
301
297
#[ rustc_clean( cfg = "cfail3" ) ]
302
298
pub fn indirect_parameter_type ( p : ParameterType ) { }
303
299
}
304
300
305
-
306
301
// Change Trait Bound Indirectly -----------------------------------------------
307
302
308
303
pub trait ReferencedTrait1 { }
@@ -319,7 +314,6 @@ pub mod change_trait_bound_indirectly {
319
314
pub fn indirect_trait_bound < T : Trait > ( p : T ) { }
320
315
}
321
316
322
-
323
317
// Change Trait Bound Indirectly In Where Clause -------------------------------
324
318
325
319
pub mod change_trait_bound_indirectly_in_where_clause {
0 commit comments