@@ -176,7 +176,10 @@ pub fn check(path: &Path, bad: &mut bool, verbose: bool) -> CollectedFeatures {
176
176
CollectedFeatures { lib : lib_features, lang : features }
177
177
}
178
178
179
- fn format_features < ' a > ( features : & ' a Features , family : & ' a str ) -> impl Iterator < Item = String > + ' a {
179
+ fn format_features < ' a > (
180
+ features : & ' a Features ,
181
+ family : & ' a str ,
182
+ ) -> impl Iterator < Item = String > + ' a {
180
183
features. iter ( ) . map ( move |( name, feature) | {
181
184
format ! ( "{:<32} {:<8} {:<12} {:<8}" ,
182
185
name,
@@ -228,7 +231,8 @@ pub fn collect_lang_features(base_src_path: &Path, bad: &mut bool) -> Features {
228
231
}
229
232
230
233
fn collect_lang_features_in ( base : & Path , file : & str , bad : & mut bool ) -> Features {
231
- let contents = t ! ( fs:: read_to_string( base. join( "libsyntax/feature_gate" ) . join( file) ) ) ;
234
+ let path = base. join ( "libsyntax/feature_gate" ) . join ( file) ;
235
+ let contents = t ! ( fs:: read_to_string( & path) ) ;
232
236
233
237
// We allow rustc-internal features to omit a tracking issue.
234
238
// To make tidy accept omitting a tracking issue, group the list of features
@@ -259,8 +263,9 @@ fn collect_lang_features_in(base: &Path, file: &str, bad: &mut bool) -> Features
259
263
if in_feature_group {
260
264
tidy_error ! (
261
265
bad,
262
- // ignore-tidy-linelength
263
- "libsyntax/feature_gate.rs:{}: new feature group is started without ending the previous one" ,
266
+ "{}:{}: \
267
+ new feature group is started without ending the previous one",
268
+ path. display( ) ,
264
269
line_number,
265
270
) ;
266
271
}
@@ -289,7 +294,8 @@ fn collect_lang_features_in(base: &Path, file: &str, bad: &mut bool) -> Features
289
294
Err ( err) => {
290
295
tidy_error ! (
291
296
bad,
292
- "libsyntax/feature_gate.rs:{}: failed to parse since: {} ({:?})" ,
297
+ "{}:{}: failed to parse since: {} ({:?})" ,
298
+ path. display( ) ,
293
299
line_number,
294
300
since_str,
295
301
err,
@@ -301,7 +307,8 @@ fn collect_lang_features_in(base: &Path, file: &str, bad: &mut bool) -> Features
301
307
if prev_since > since {
302
308
tidy_error ! (
303
309
bad,
304
- "libsyntax/feature_gate.rs:{}: feature {} is not sorted by since" ,
310
+ "{}:{}: feature {} is not sorted by since" ,
311
+ path. display( ) ,
305
312
line_number,
306
313
name,
307
314
) ;
@@ -315,7 +322,8 @@ fn collect_lang_features_in(base: &Path, file: &str, bad: &mut bool) -> Features
315
322
* bad = true ;
316
323
tidy_error ! (
317
324
bad,
318
- "libsyntax/feature_gate.rs:{}: no tracking issue for feature {}" ,
325
+ "{}:{}: no tracking issue for feature {}" ,
326
+ path. display( ) ,
319
327
line_number,
320
328
name,
321
329
) ;
0 commit comments