Skip to content

Commit 10b23e3

Browse files
committed
Format function_interfaces.rs
1 parent 274fb66 commit 10b23e3

File tree

1 file changed

+40
-46
lines changed

1 file changed

+40
-46
lines changed

src/test/incremental/hashes/function_interfaces.rs

+40-46
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,24 @@
99
// revisions: cfail1 cfail2 cfail3
1010
// compile-flags: -Z query-dep-graph -Zincremental-ignore-spans
1111

12-
1312
#![allow(warnings)]
1413
#![feature(linkage)]
1514
#![feature(rustc_attrs)]
1615
#![crate_type = "rlib"]
1716

18-
1917
// Add Parameter ---------------------------------------------------------------
2018

2119
#[cfg(cfail1)]
2220
pub fn add_parameter() {}
2321

2422
#[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+
)]
2727
#[rustc_clean(cfg = "cfail3")]
2828
pub fn add_parameter(p: i32) {}
2929

30-
3130
// Add Return Type -------------------------------------------------------------
3231

3332
#[cfg(cfail1)]
@@ -38,55 +37,58 @@ pub fn add_return_type() {}
3837
#[rustc_clean(cfg = "cfail3")]
3938
pub fn add_return_type() -> () {}
4039

41-
4240
// Change Parameter Type -------------------------------------------------------
4341

4442
#[cfg(cfail1)]
4543
pub fn type_of_parameter(p: i32) {}
4644

4745
#[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+
)]
5050
#[rustc_clean(cfg = "cfail3")]
5151
pub fn type_of_parameter(p: i64) {}
5252

53-
5453
// Change Parameter Type Reference ---------------------------------------------
5554

5655
#[cfg(cfail1)]
5756
pub fn type_of_parameter_ref(p: &i32) {}
5857

5958
#[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+
)]
6263
#[rustc_clean(cfg = "cfail3")]
6364
pub fn type_of_parameter_ref(p: &mut i32) {}
6465

65-
6666
// Change Parameter Order ------------------------------------------------------
6767

6868
#[cfg(cfail1)]
6969
pub fn order_of_parameters(p1: i32, p2: i64) {}
7070

7171
#[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+
)]
7476
#[rustc_clean(cfg = "cfail3")]
7577
pub fn order_of_parameters(p2: i64, p1: i32) {}
7678

77-
7879
// Unsafe ----------------------------------------------------------------------
7980

8081
#[cfg(cfail1)]
8182
pub fn make_unsafe() {}
8283

8384
#[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+
)]
8689
#[rustc_clean(cfg = "cfail3")]
8790
pub unsafe fn make_unsafe() {}
8891

89-
9092
// Extern ----------------------------------------------------------------------
9193

9294
#[cfg(cfail1)]
@@ -97,19 +99,19 @@ pub fn make_extern() {}
9799
#[rustc_clean(cfg = "cfail3")]
98100
pub extern "C" fn make_extern() {}
99101

100-
101102
// Type Parameter --------------------------------------------------------------
102103

103104
#[cfg(cfail1)]
104105
pub fn type_parameter() {}
105106

106107
#[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+
)]
109112
#[rustc_clean(cfg = "cfail3")]
110113
pub fn type_parameter<T>() {}
111114

112-
113115
// Lifetime Parameter ----------------------------------------------------------
114116

115117
#[cfg(cfail1)]
@@ -120,7 +122,6 @@ pub fn lifetime_parameter() {}
120122
#[rustc_clean(cfg = "cfail3")]
121123
pub fn lifetime_parameter<'a>() {}
122124

123-
124125
// Trait Bound -----------------------------------------------------------------
125126

126127
#[cfg(cfail1)]
@@ -131,7 +132,6 @@ pub fn trait_bound<T>() {}
131132
#[rustc_clean(cfg = "cfail3")]
132133
pub fn trait_bound<T: Eq>() {}
133134

134-
135135
// Builtin Bound ---------------------------------------------------------------
136136

137137
#[cfg(cfail1)]
@@ -142,19 +142,19 @@ pub fn builtin_bound<T>() {}
142142
#[rustc_clean(cfg = "cfail3")]
143143
pub fn builtin_bound<T: Send>() {}
144144

145-
146145
// Lifetime Bound --------------------------------------------------------------
147146

148147
#[cfg(cfail1)]
149148
pub fn lifetime_bound<'a, T>() {}
150149

151150
#[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+
)]
154155
#[rustc_clean(cfg = "cfail3")]
155156
pub fn lifetime_bound<'a, T: 'a>() {}
156157

157-
158158
// Second Trait Bound ----------------------------------------------------------
159159

160160
#[cfg(cfail1)]
@@ -165,7 +165,6 @@ pub fn second_trait_bound<T: Eq>() {}
165165
#[rustc_clean(cfg = "cfail3")]
166166
pub fn second_trait_bound<T: Eq + Clone>() {}
167167

168-
169168
// Second Builtin Bound --------------------------------------------------------
170169

171170
#[cfg(cfail1)]
@@ -176,19 +175,19 @@ pub fn second_builtin_bound<T: Send>() {}
176175
#[rustc_clean(cfg = "cfail3")]
177176
pub fn second_builtin_bound<T: Send + Sized>() {}
178177

179-
180178
// Second Lifetime Bound -------------------------------------------------------
181179

182180
#[cfg(cfail1)]
183181
pub fn second_lifetime_bound<'a, 'b, T: 'a>() {}
184182

185183
#[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+
)]
188188
#[rustc_clean(cfg = "cfail3")]
189189
pub fn second_lifetime_bound<'a, 'b, T: 'a + 'b>() {}
190190

191-
192191
// Inline ----------------------------------------------------------------------
193192

194193
#[cfg(cfail1)]
@@ -200,7 +199,6 @@ pub fn inline() {}
200199
#[inline]
201200
pub fn inline() {}
202201

203-
204202
// Inline Never ----------------------------------------------------------------
205203

206204
#[cfg(cfail1)]
@@ -213,7 +211,6 @@ pub fn inline_never() {}
213211
#[inline(never)]
214212
pub fn inline_never() {}
215213

216-
217214
// No Mangle -------------------------------------------------------------------
218215

219216
#[cfg(cfail1)]
@@ -225,7 +222,6 @@ pub fn no_mangle() {}
225222
#[no_mangle]
226223
pub fn no_mangle() {}
227224

228-
229225
// Linkage ---------------------------------------------------------------------
230226

231227
#[cfg(cfail1)]
@@ -237,7 +233,6 @@ pub fn linkage() {}
237233
#[linkage = "weak_odr"]
238234
pub fn linkage() {}
239235

240-
241236
// Return Impl Trait -----------------------------------------------------------
242237

243238
#[cfg(cfail1)]
@@ -252,7 +247,6 @@ pub fn return_impl_trait() -> impl Clone {
252247
0
253248
}
254249

255-
256250
// Change Return Impl Trait ----------------------------------------------------
257251

258252
#[cfg(cfail1)]
@@ -267,7 +261,6 @@ pub fn change_return_impl_trait() -> impl Copy {
267261
0u32
268262
}
269263

270-
271264
// Change Return Type Indirectly -----------------------------------------------
272265

273266
pub struct ReferencedType1;
@@ -279,15 +272,16 @@ pub mod change_return_type_indirectly {
279272
#[cfg(not(cfail1))]
280273
use super::ReferencedType2 as ReturnType;
281274

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+
)]
284279
#[rustc_clean(cfg = "cfail3")]
285280
pub fn indirect_return_type() -> ReturnType {
286281
ReturnType {}
287282
}
288283
}
289284

290-
291285
// Change Parameter Type Indirectly --------------------------------------------
292286

293287
pub mod change_parameter_type_indirectly {
@@ -296,13 +290,14 @@ pub mod change_parameter_type_indirectly {
296290
#[cfg(not(cfail1))]
297291
use super::ReferencedType2 as ParameterType;
298292

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+
)]
301297
#[rustc_clean(cfg = "cfail3")]
302298
pub fn indirect_parameter_type(p: ParameterType) {}
303299
}
304300

305-
306301
// Change Trait Bound Indirectly -----------------------------------------------
307302

308303
pub trait ReferencedTrait1 {}
@@ -319,7 +314,6 @@ pub mod change_trait_bound_indirectly {
319314
pub fn indirect_trait_bound<T: Trait>(p: T) {}
320315
}
321316

322-
323317
// Change Trait Bound Indirectly In Where Clause -------------------------------
324318

325319
pub mod change_trait_bound_indirectly_in_where_clause {

0 commit comments

Comments
 (0)