about summary refs log tree commit diff
path: root/compiler/rustc_thread_pool
diff options
context:
space:
mode:
authorMarijn Schouten <mhkbst@gmail.com>2025-08-23 19:36:19 +0000
committerMarijn Schouten <mhkbst@gmail.com>2025-08-26 06:36:53 +0000
commit845311a065a5638c516ed96c73b09862b176b329 (patch)
treea53242a98adddb23ece0ff83ade5bb4d6663d47a /compiler/rustc_thread_pool
parent6d6a08cf590ec26296447b8d2cf2329bb64c303a (diff)
downloadrust-845311a065a5638c516ed96c73b09862b176b329.tar.gz
rust-845311a065a5638c516ed96c73b09862b176b329.zip
remove deprecated Error::description in impls
Diffstat (limited to 'compiler/rustc_thread_pool')
-rw-r--r--compiler/rustc_thread_pool/src/lib.rs15
1 files changed, 3 insertions, 12 deletions
diff --git a/compiler/rustc_thread_pool/src/lib.rs b/compiler/rustc_thread_pool/src/lib.rs
index 34252d919e3..7ce7fbc27ea 100644
--- a/compiler/rustc_thread_pool/src/lib.rs
+++ b/compiler/rustc_thread_pool/src/lib.rs
@@ -787,18 +787,7 @@ impl ThreadPoolBuildError {
     }
 }
 
-const GLOBAL_POOL_ALREADY_INITIALIZED: &str =
-    "The global thread pool has already been initialized.";
-
 impl Error for ThreadPoolBuildError {
-    #[allow(deprecated)]
-    fn description(&self) -> &str {
-        match self.kind {
-            ErrorKind::GlobalPoolAlreadyInitialized => GLOBAL_POOL_ALREADY_INITIALIZED,
-            ErrorKind::IOError(ref e) => e.description(),
-        }
-    }
-
     fn source(&self) -> Option<&(dyn Error + 'static)> {
         match &self.kind {
             ErrorKind::GlobalPoolAlreadyInitialized => None,
@@ -810,7 +799,9 @@ impl Error for ThreadPoolBuildError {
 impl fmt::Display for ThreadPoolBuildError {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         match &self.kind {
-            ErrorKind::GlobalPoolAlreadyInitialized => GLOBAL_POOL_ALREADY_INITIALIZED.fmt(f),
+            ErrorKind::GlobalPoolAlreadyInitialized => {
+                "The global thread pool has already been initialized.".fmt(f)
+            }
             ErrorKind::IOError(e) => e.fmt(f),
         }
     }