@@ -25,29 +25,27 @@ fn main() {
25
25
let doc_targets: HashSet < _ > = doc_targets_md
26
26
. lines ( )
27
27
. filter ( |line| line. starts_with ( & [ '`' , '[' ] [ ..] ) && line. contains ( '|' ) )
28
- . map ( |line| line. split ( '`' ) . skip ( 1 ) . next ( ) . expect ( "expected target code span" ) )
28
+ . map ( |line| line. split ( '`' ) . nth ( 1 ) . expect ( "expected target code span" ) )
29
29
. collect ( ) ;
30
30
31
31
let missing: Vec < _ > = target_list. difference ( & doc_targets) . collect ( ) ;
32
32
let extra: Vec < _ > = doc_targets. difference ( & target_list) . collect ( ) ;
33
33
for target in & missing {
34
34
eprintln ! (
35
- "error: target `{}` is missing from {}\n \
36
- If this is a new target, please add it to {}.",
37
- target, filename, src
35
+ "error: target `{target}` is missing from {filename}\n \
36
+ If this is a new target, please add it to {src}."
38
37
) ;
39
38
}
40
39
for target in & extra {
41
40
eprintln ! (
42
- "error: target `{}` is in {}, but does not appear in the rustc target list\n \
43
- If the target has been removed, please edit {} and remove the target.",
44
- target, filename, src
41
+ "error: target `{target}` is in {filename}, but does not appear in the rustc target list\n \
42
+ If the target has been removed, please edit {src} and remove the target."
45
43
) ;
46
44
}
47
45
// Check target names for unwanted characters like `.` that can cause problems e.g. in Cargo.
48
46
// See also Tier 3 target policy.
49
47
// If desired, target names can ignore this check.
50
- let ignore_target_names = vec ! [
48
+ let ignore_target_names = [
51
49
"thumbv8m.base-none-eabi" ,
52
50
"thumbv8m.main-none-eabi" ,
53
51
"thumbv8m.main-none-eabihf" ,
0 commit comments