about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-02-29 10:14:21 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-02-29 16:30:12 +1100
commit3c3f15cafe2945bd3b0db899b5288c678d392b2c (patch)
tree48f4fed4cfa81e4c3cf8080b0cd3c319df88facb /compiler/rustc_errors/src
parent869bd03a04fa2c6f95dc78523d098ed6b1e88b04 (diff)
downloadrust-3c3f15cafe2945bd3b0db899b5288c678d392b2c.tar.gz
rust-3c3f15cafe2945bd3b0db899b5288c678d392b2c.zip
Use `Destination` more.
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/emitter.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs
index 967b7674e05..cbe973330dc 100644
--- a/compiler/rustc_errors/src/emitter.rs
+++ b/compiler/rustc_errors/src/emitter.rs
@@ -60,7 +60,7 @@ impl HumanReadableErrorType {
     }
     pub fn new_emitter(
         self,
-        mut dst: Box<dyn WriteColor + Send>,
+        mut dst: Destination,
         fallback_bundle: LazyFallbackBundle,
     ) -> HumanEmitter {
         let (short, color_config) = self.unzip();
@@ -686,10 +686,7 @@ impl HumanEmitter {
         }
     }
 
-    pub fn new(
-        dst: Box<dyn WriteColor + Send>,
-        fallback_bundle: LazyFallbackBundle,
-    ) -> HumanEmitter {
+    pub fn new(dst: Destination, fallback_bundle: LazyFallbackBundle) -> HumanEmitter {
         Self::create(dst, fallback_bundle)
     }
 
@@ -2634,7 +2631,7 @@ fn emit_to_destination(
     Ok(())
 }
 
-pub type Destination = Box<(dyn WriteColor + Send)>;
+pub type Destination = Box<dyn WriteColor + Send>;
 
 struct Buffy {
     buffer_writer: BufferWriter,