about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2025-07-14 11:04:57 +0200
committerGitHub <noreply@github.com>2025-07-14 11:04:57 +0200
commit0d69847b3c6961682b5dd09b7e652d25a7ecbdce (patch)
tree0a1c94247911f5d7efe53acf4391ea2195b1f552
parentb5312fe567958e76a09da301b9aaa796b339abe3 (diff)
parent39059f61812d487ea7e7e1df3a1034aac05379a8 (diff)
downloadrust-0d69847b3c6961682b5dd09b7e652d25a7ecbdce.tar.gz
rust-0d69847b3c6961682b5dd09b7e652d25a7ecbdce.zip
Rollup merge of #143918 - hkBst:tier-check-cleanup, r=Kobzol
Tier check cleanup

clippy cleanup + edition 2024
-rw-r--r--src/tools/tier-check/Cargo.toml2
-rw-r--r--src/tools/tier-check/src/main.rs14
2 files changed, 7 insertions, 9 deletions
diff --git a/src/tools/tier-check/Cargo.toml b/src/tools/tier-check/Cargo.toml
index 3f08165a3fc..a34f9447fab 100644
--- a/src/tools/tier-check/Cargo.toml
+++ b/src/tools/tier-check/Cargo.toml
@@ -1,7 +1,7 @@
 [package]
 name = "tier-check"
 version = "0.1.0"
-edition = "2021"
+edition = "2024"
 license = "MIT OR Apache-2.0"
 
 [dependencies]
diff --git a/src/tools/tier-check/src/main.rs b/src/tools/tier-check/src/main.rs
index 91b96117db0..6c27a2ec442 100644
--- a/src/tools/tier-check/src/main.rs
+++ b/src/tools/tier-check/src/main.rs
@@ -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",