about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-06-22 17:35:36 +0200
committerGitHub <noreply@github.com>2025-06-22 17:35:36 +0200
commitf1fa46d3ba5322cc49c0eadf4afb0844998ca7db (patch)
tree849d20a3e555a047c6962f393c3927988465d0af
parent0f89e61c4dd4f274029673d2963465cbf73d58c2 (diff)
parentd092dc9381bd6f09017c4b09777df4537999b952 (diff)
downloadrust-f1fa46d3ba5322cc49c0eadf4afb0844998ca7db.tar.gz
rust-f1fa46d3ba5322cc49c0eadf4afb0844998ca7db.zip
Rollup merge of #142868 - klensy:dc, r=oli-obk
remove few allow(dead_code)

Few from serial/parallel compiler leftovers and few from bootstrap.
-rw-r--r--compiler/rustc_data_structures/src/sync/lock.rs2
-rw-r--r--compiler/rustc_data_structures/src/sync/parallel.rs2
-rw-r--r--src/bootstrap/src/core/build_steps/setup.rs2
-rw-r--r--src/bootstrap/src/core/build_steps/tool.rs1
4 files changed, 1 insertions, 6 deletions
diff --git a/compiler/rustc_data_structures/src/sync/lock.rs b/compiler/rustc_data_structures/src/sync/lock.rs
index 2ccf06ccd4f..a8161c51511 100644
--- a/compiler/rustc_data_structures/src/sync/lock.rs
+++ b/compiler/rustc_data_structures/src/sync/lock.rs
@@ -1,8 +1,6 @@
 //! This module implements a lock which only uses synchronization if `might_be_dyn_thread_safe` is true.
 //! It implements `DynSend` and `DynSync` instead of the typical `Send` and `Sync` traits.
 
-#![allow(dead_code)]
-
 use std::fmt;
 
 #[derive(Clone, Copy, PartialEq)]
diff --git a/compiler/rustc_data_structures/src/sync/parallel.rs b/compiler/rustc_data_structures/src/sync/parallel.rs
index ff4b60a1031..b515c0bee8a 100644
--- a/compiler/rustc_data_structures/src/sync/parallel.rs
+++ b/compiler/rustc_data_structures/src/sync/parallel.rs
@@ -1,8 +1,6 @@
 //! This module defines parallel operations that are implemented in
 //! one way for the serial compiler, and another way the parallel compiler.
 
-#![allow(dead_code)]
-
 use std::any::Any;
 use std::panic::{AssertUnwindSafe, catch_unwind, resume_unwind};
 
diff --git a/src/bootstrap/src/core/build_steps/setup.rs b/src/bootstrap/src/core/build_steps/setup.rs
index 86b7456d7b4..9ce81ff9a22 100644
--- a/src/bootstrap/src/core/build_steps/setup.rs
+++ b/src/bootstrap/src/core/build_steps/setup.rs
@@ -531,7 +531,7 @@ enum EditorKind {
 
 impl EditorKind {
     // Used in `./tests.rs`.
-    #[allow(dead_code)]
+    #[cfg(test)]
     pub const ALL: &[EditorKind] = &[
         EditorKind::Emacs,
         EditorKind::Helix,
diff --git a/src/bootstrap/src/core/build_steps/tool.rs b/src/bootstrap/src/core/build_steps/tool.rs
index 1594080815f..248ee4196b8 100644
--- a/src/bootstrap/src/core/build_steps/tool.rs
+++ b/src/bootstrap/src/core/build_steps/tool.rs
@@ -390,7 +390,6 @@ macro_rules! bootstrap_tool {
         ;
     )+) => {
         #[derive(PartialEq, Eq, Clone)]
-        #[allow(dead_code)]
         pub enum Tool {
             $(
                 $name,