Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/tools/tier-check/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "tier-check"
version = "0.1.0"
edition = "2021"
edition = "2024"
license = "MIT OR Apache-2.0"

[dependencies]
14 changes: 6 additions & 8 deletions src/tools/tier-check/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,27 @@ fn main() {
let doc_targets: HashSet<_> = doc_targets_md
.lines()
.filter(|line| line.starts_with(&['`', '['][..]) && line.contains('|'))
.map(|line| line.split('`').skip(1).next().expect("expected target code span"))
.map(|line| line.split('`').nth(1).expect("expected target code span"))
.collect();

let missing: Vec<_> = target_list.difference(&doc_targets).collect();
let extra: Vec<_> = doc_targets.difference(&target_list).collect();
for target in &missing {
eprintln!(
"error: target `{}` is missing from {}\n\
If this is a new target, please add it to {}.",
target, filename, src
"error: target `{target}` is missing from {filename}\n\
If this is a new target, please add it to {src}."
);
}
for target in &extra {
eprintln!(
"error: target `{}` is in {}, but does not appear in the rustc target list\n\
If the target has been removed, please edit {} and remove the target.",
target, filename, src
"error: target `{target}` is in {filename}, but does not appear in the rustc target list\n\
If the target has been removed, please edit {src} and remove the target."
);
}
// Check target names for unwanted characters like `.` that can cause problems e.g. in Cargo.
// See also Tier 3 target policy.
// If desired, target names can ignore this check.
let ignore_target_names = vec![
let ignore_target_names = [
"thumbv8m.base-none-eabi",
"thumbv8m.main-none-eabi",
"thumbv8m.main-none-eabihf",
Expand Down
Loading