diff options
| author | Marijn Schouten <mhkbst@gmail.com> | 2025-08-23 19:36:19 +0000 |
|---|---|---|
| committer | Marijn Schouten <mhkbst@gmail.com> | 2025-08-26 06:36:53 +0000 |
| commit | 845311a065a5638c516ed96c73b09862b176b329 (patch) | |
| tree | a53242a98adddb23ece0ff83ade5bb4d6663d47a /compiler/rustc_thread_pool | |
| parent | 6d6a08cf590ec26296447b8d2cf2329bb64c303a (diff) | |
| download | rust-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.rs | 15 |
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), } } |
