File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -413,19 +413,21 @@ fn check_rustfix_coverage() {
413
413
if let Ok ( missing_coverage_contents) = std:: fs:: read_to_string ( missing_coverage_path) {
414
414
assert ! ( RUSTFIX_COVERAGE_KNOWN_EXCEPTIONS . iter( ) . is_sorted_by_key( Path :: new) ) ;
415
415
416
- for rs_path in missing_coverage_contents. lines ( ) {
417
- if Path :: new ( rs_path) . starts_with ( "tests/ui/crashes" ) {
416
+ for rs_file in missing_coverage_contents. lines ( ) {
417
+ let rs_path = Path :: new ( rs_file) ;
418
+ if rs_path. starts_with ( "tests/ui/crashes" ) {
418
419
continue ;
419
420
}
420
- let filename = Path :: new ( rs_path) . strip_prefix ( "tests/ui/" ) . unwrap ( ) ;
421
+ assert ! ( rs_path. starts_with( "tests/ui/" ) , "{:?}" , rs_file) ;
422
+ let filename = rs_path. strip_prefix ( "tests/ui/" ) . unwrap ( ) ;
421
423
assert ! (
422
424
RUSTFIX_COVERAGE_KNOWN_EXCEPTIONS
423
425
. binary_search_by_key( & filename, Path :: new)
424
426
. is_ok( ) ,
425
427
"`{}` runs `MachineApplicable` diagnostics but is missing a `run-rustfix` annotation. \
426
428
Please either add `// run-rustfix` at the top of the file or add the file to \
427
429
`RUSTFIX_COVERAGE_KNOWN_EXCEPTIONS` in `tests/compile-test.rs`.",
428
- rs_path ,
430
+ rs_file ,
429
431
) ;
430
432
}
431
433
}
You can’t perform that action at this time.
0 commit comments