Skip to content

Commit 0d69847

Browse files
authored
Rollup merge of #143918 - hkBst:tier-check-cleanup, r=Kobzol
Tier check cleanup clippy cleanup + edition 2024
2 parents b5312fe + 39059f6 commit 0d69847

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/tools/tier-check/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "tier-check"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55
license = "MIT OR Apache-2.0"
66

77
[dependencies]

src/tools/tier-check/src/main.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,29 +25,27 @@ fn main() {
2525
let doc_targets: HashSet<_> = doc_targets_md
2626
.lines()
2727
.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"))
2929
.collect();
3030

3131
let missing: Vec<_> = target_list.difference(&doc_targets).collect();
3232
let extra: Vec<_> = doc_targets.difference(&target_list).collect();
3333
for target in &missing {
3434
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}."
3837
);
3938
}
4039
for target in &extra {
4140
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."
4543
);
4644
}
4745
// Check target names for unwanted characters like `.` that can cause problems e.g. in Cargo.
4846
// See also Tier 3 target policy.
4947
// If desired, target names can ignore this check.
50-
let ignore_target_names = vec![
48+
let ignore_target_names = [
5149
"thumbv8m.base-none-eabi",
5250
"thumbv8m.main-none-eabi",
5351
"thumbv8m.main-none-eabihf",

0 commit comments

Comments
 (0)