Skip to content

Commit 3f0cc7c

Browse files
committed
Format function interface fingerprint hash tests
1 parent 104ebd2 commit 3f0cc7c

File tree

1 file changed

+70
-56
lines changed

1 file changed

+70
-56
lines changed

src/test/incremental/hashes/function_interfaces.rs

+70-56
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#![feature(intrinsics)]
2727
#![feature(linkage)]
2828
#![feature(rustc_attrs)]
29-
#![crate_type="rlib"]
29+
#![crate_type = "rlib"]
3030

3131

3232
// Add Parameter ---------------------------------------------------------------
@@ -35,8 +35,9 @@
3535
pub fn add_parameter() {}
3636

3737
#[cfg(not(cfail1))]
38-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")]
39-
#[rustc_clean(cfg="cfail3")]
38+
#[rustc_clean(cfg = "cfail2",
39+
except = "Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")]
40+
#[rustc_clean(cfg = "cfail3")]
4041
pub fn add_parameter(p: i32) {}
4142

4243

@@ -46,8 +47,8 @@ pub fn add_parameter(p: i32) {}
4647
pub fn add_return_type() {}
4748

4849
#[cfg(not(cfail1))]
49-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody")]
50-
#[rustc_clean(cfg="cfail3")]
50+
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody")]
51+
#[rustc_clean(cfg = "cfail3")]
5152
pub fn add_return_type() -> () {}
5253

5354

@@ -57,8 +58,9 @@ pub fn add_return_type() -> () {}
5758
pub fn type_of_parameter(p: i32) {}
5859

5960
#[cfg(not(cfail1))]
60-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")]
61-
#[rustc_clean(cfg="cfail3")]
61+
#[rustc_clean(cfg = "cfail2",
62+
except = "Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")]
63+
#[rustc_clean(cfg = "cfail3")]
6264
pub fn type_of_parameter(p: i64) {}
6365

6466

@@ -68,8 +70,9 @@ pub fn type_of_parameter(p: i64) {}
6870
pub fn type_of_parameter_ref(p: &i32) {}
6971

7072
#[cfg(not(cfail1))]
71-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")]
72-
#[rustc_clean(cfg="cfail3")]
73+
#[rustc_clean(cfg = "cfail2",
74+
except = "Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")]
75+
#[rustc_clean(cfg = "cfail3")]
7376
pub fn type_of_parameter_ref(p: &mut i32) {}
7477

7578

@@ -79,8 +82,9 @@ pub fn type_of_parameter_ref(p: &mut i32) {}
7982
pub fn order_of_parameters(p1: i32, p2: i64) {}
8083

8184
#[cfg(not(cfail1))]
82-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")]
83-
#[rustc_clean(cfg="cfail3")]
85+
#[rustc_clean(cfg = "cfail2",
86+
except = "Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")]
87+
#[rustc_clean(cfg = "cfail3")]
8488
pub fn order_of_parameters(p2: i64, p1: i32) {}
8589

8690

@@ -90,8 +94,9 @@ pub fn order_of_parameters(p2: i64, p1: i32) {}
9094
pub fn make_unsafe() {}
9195

9296
#[cfg(not(cfail1))]
93-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")]
94-
#[rustc_clean(cfg="cfail3")]
97+
#[rustc_clean(cfg = "cfail2",
98+
except = "Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")]
99+
#[rustc_clean(cfg = "cfail3")]
95100
pub unsafe fn make_unsafe() {}
96101

97102

@@ -101,9 +106,9 @@ pub unsafe fn make_unsafe() {}
101106
pub fn make_extern() {}
102107

103108
#[cfg(not(cfail1))]
104-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody, TypeckTables, FnSignature")]
105-
#[rustc_clean(cfg="cfail3")]
106-
pub extern fn make_extern() {}
109+
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, TypeckTables, FnSignature")]
110+
#[rustc_clean(cfg = "cfail3")]
111+
pub extern "C" fn make_extern() {}
107112

108113

109114
// Extern C Extern Rust-Intrinsic ----------------------------------------------
@@ -112,8 +117,8 @@ pub extern fn make_extern() {}
112117
pub extern "C" fn make_intrinsic() {}
113118

114119
#[cfg(not(cfail1))]
115-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody, TypeckTables, FnSignature")]
116-
#[rustc_clean(cfg="cfail3")]
120+
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, TypeckTables, FnSignature")]
121+
#[rustc_clean(cfg = "cfail3")]
117122
pub extern "rust-intrinsic" fn make_intrinsic() {}
118123

119124

@@ -123,8 +128,9 @@ pub extern "rust-intrinsic" fn make_intrinsic() {}
123128
pub fn type_parameter() {}
124129

125130
#[cfg(not(cfail1))]
126-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody, GenericsOfItem, TypeOfItem, PredicatesOfItem")]
127-
#[rustc_clean(cfg="cfail3")]
131+
#[rustc_clean(cfg = "cfail2",
132+
except = "Hir, HirBody, GenericsOfItem, TypeOfItem, PredicatesOfItem")]
133+
#[rustc_clean(cfg = "cfail3")]
128134
pub fn type_parameter<T>() {}
129135

130136

@@ -134,8 +140,8 @@ pub fn type_parameter<T>() {}
134140
pub fn lifetime_parameter() {}
135141

136142
#[cfg(not(cfail1))]
137-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody, GenericsOfItem")]
138-
#[rustc_clean(cfg="cfail3")]
143+
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, GenericsOfItem")]
144+
#[rustc_clean(cfg = "cfail3")]
139145
pub fn lifetime_parameter<'a>() {}
140146

141147

@@ -145,8 +151,8 @@ pub fn lifetime_parameter<'a>() {}
145151
pub fn trait_bound<T>() {}
146152

147153
#[cfg(not(cfail1))]
148-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody, PredicatesOfItem")]
149-
#[rustc_clean(cfg="cfail3")]
154+
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, PredicatesOfItem")]
155+
#[rustc_clean(cfg = "cfail3")]
150156
pub fn trait_bound<T: Eq>() {}
151157

152158

@@ -156,8 +162,8 @@ pub fn trait_bound<T: Eq>() {}
156162
pub fn builtin_bound<T>() {}
157163

158164
#[cfg(not(cfail1))]
159-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody, PredicatesOfItem")]
160-
#[rustc_clean(cfg="cfail3")]
165+
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, PredicatesOfItem")]
166+
#[rustc_clean(cfg = "cfail3")]
161167
pub fn builtin_bound<T: Send>() {}
162168

163169

@@ -167,8 +173,9 @@ pub fn builtin_bound<T: Send>() {}
167173
pub fn lifetime_bound<'a, T>() {}
168174

169175
#[cfg(not(cfail1))]
170-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody, GenericsOfItem, TypeOfItem, PredicatesOfItem")]
171-
#[rustc_clean(cfg="cfail3")]
176+
#[rustc_clean(cfg = "cfail2",
177+
except = "Hir, HirBody, GenericsOfItem, TypeOfItem, PredicatesOfItem")]
178+
#[rustc_clean(cfg = "cfail3")]
172179
pub fn lifetime_bound<'a, T: 'a>() {}
173180

174181

@@ -178,8 +185,8 @@ pub fn lifetime_bound<'a, T: 'a>() {}
178185
pub fn second_trait_bound<T: Eq>() {}
179186

180187
#[cfg(not(cfail1))]
181-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody, PredicatesOfItem")]
182-
#[rustc_clean(cfg="cfail3")]
188+
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, PredicatesOfItem")]
189+
#[rustc_clean(cfg = "cfail3")]
183190
pub fn second_trait_bound<T: Eq + Clone>() {}
184191

185192

@@ -189,8 +196,8 @@ pub fn second_trait_bound<T: Eq + Clone>() {}
189196
pub fn second_builtin_bound<T: Send>() {}
190197

191198
#[cfg(not(cfail1))]
192-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody, PredicatesOfItem")]
193-
#[rustc_clean(cfg="cfail3")]
199+
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, PredicatesOfItem")]
200+
#[rustc_clean(cfg = "cfail3")]
194201
pub fn second_builtin_bound<T: Send + Sized>() {}
195202

196203

@@ -200,8 +207,9 @@ pub fn second_builtin_bound<T: Send + Sized>() {}
200207
pub fn second_lifetime_bound<'a, 'b, T: 'a>() {}
201208

202209
#[cfg(not(cfail1))]
203-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody, GenericsOfItem, TypeOfItem, PredicatesOfItem")]
204-
#[rustc_clean(cfg="cfail3")]
210+
#[rustc_clean(cfg = "cfail2",
211+
except = "Hir, HirBody, GenericsOfItem, TypeOfItem, PredicatesOfItem")]
212+
#[rustc_clean(cfg = "cfail3")]
205213
pub fn second_lifetime_bound<'a, 'b, T: 'a + 'b>() {}
206214

207215

@@ -211,8 +219,8 @@ pub fn second_lifetime_bound<'a, 'b, T: 'a + 'b>() {}
211219
pub fn inline() {}
212220

213221
#[cfg(not(cfail1))]
214-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody")]
215-
#[rustc_clean(cfg="cfail3")]
222+
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody")]
223+
#[rustc_clean(cfg = "cfail3")]
216224
#[inline]
217225
pub fn inline() {}
218226

@@ -224,8 +232,8 @@ pub fn inline() {}
224232
pub fn inline_never() {}
225233

226234
#[cfg(not(cfail1))]
227-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody")]
228-
#[rustc_clean(cfg="cfail3")]
235+
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody")]
236+
#[rustc_clean(cfg = "cfail3")]
229237
#[inline(never)]
230238
pub fn inline_never() {}
231239

@@ -236,8 +244,8 @@ pub fn inline_never() {}
236244
pub fn no_mangle() {}
237245

238246
#[cfg(not(cfail1))]
239-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody")]
240-
#[rustc_clean(cfg="cfail3")]
247+
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody")]
248+
#[rustc_clean(cfg = "cfail3")]
241249
#[no_mangle]
242250
pub fn no_mangle() {}
243251

@@ -248,9 +256,9 @@ pub fn no_mangle() {}
248256
pub fn linkage() {}
249257

250258
#[cfg(not(cfail1))]
251-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody")]
252-
#[rustc_clean(cfg="cfail3")]
253-
#[linkage="weak_odr"]
259+
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody")]
260+
#[rustc_clean(cfg = "cfail3")]
261+
#[linkage = "weak_odr"]
254262
pub fn linkage() {}
255263

256264

@@ -262,8 +270,8 @@ pub fn return_impl_trait() -> i32 {
262270
}
263271

264272
#[cfg(not(cfail1))]
265-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody, TypeckTables, FnSignature")]
266-
#[rustc_clean(cfg="cfail3")]
273+
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, TypeckTables, FnSignature")]
274+
#[rustc_clean(cfg = "cfail3")]
267275
pub fn return_impl_trait() -> impl Clone {
268276
0
269277
}
@@ -277,8 +285,8 @@ pub fn change_return_impl_trait() -> impl Clone {
277285
}
278286

279287
#[cfg(not(cfail1))]
280-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody")]
281-
#[rustc_clean(cfg="cfail3")]
288+
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody")]
289+
#[rustc_clean(cfg = "cfail3")]
282290
pub fn change_return_impl_trait() -> impl Copy {
283291
0u32
284292
}
@@ -295,8 +303,9 @@ pub mod change_return_type_indirectly {
295303
#[cfg(not(cfail1))]
296304
use super::ReferencedType2 as ReturnType;
297305

298-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")]
299-
#[rustc_clean(cfg="cfail3")]
306+
#[rustc_clean(cfg = "cfail2",
307+
except = "Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")]
308+
#[rustc_clean(cfg = "cfail3")]
300309
pub fn indirect_return_type() -> ReturnType {
301310
ReturnType {}
302311
}
@@ -311,8 +320,9 @@ pub mod change_parameter_type_indirectly {
311320
#[cfg(not(cfail1))]
312321
use super::ReferencedType2 as ParameterType;
313322

314-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")]
315-
#[rustc_clean(cfg="cfail3")]
323+
#[rustc_clean(cfg = "cfail2",
324+
except = "Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")]
325+
#[rustc_clean(cfg = "cfail3")]
316326
pub fn indirect_parameter_type(p: ParameterType) {}
317327
}
318328

@@ -328,8 +338,8 @@ pub mod change_trait_bound_indirectly {
328338
#[cfg(not(cfail1))]
329339
use super::ReferencedTrait2 as Trait;
330340

331-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody, PredicatesOfItem")]
332-
#[rustc_clean(cfg="cfail3")]
341+
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, PredicatesOfItem")]
342+
#[rustc_clean(cfg = "cfail3")]
333343
pub fn indirect_trait_bound<T: Trait>(p: T) {}
334344
}
335345

@@ -342,7 +352,11 @@ pub mod change_trait_bound_indirectly_in_where_clause {
342352
#[cfg(not(cfail1))]
343353
use super::ReferencedTrait2 as Trait;
344354

345-
#[rustc_clean(cfg="cfail2", except="Hir, HirBody, PredicatesOfItem")]
346-
#[rustc_clean(cfg="cfail3")]
347-
pub fn indirect_trait_bound_where<T>(p: T) where T: Trait {}
355+
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, PredicatesOfItem")]
356+
#[rustc_clean(cfg = "cfail3")]
357+
pub fn indirect_trait_bound_where<T>(p: T)
358+
where
359+
T: Trait,
360+
{
361+
}
348362
}

0 commit comments

Comments
 (0)