@@ -6,13 +6,6 @@ use rustc_session::config::{Input, OutputFilenames, OutputTypes};
66use rustc_span:: FileName ;
77use std:: io:: Write ;
88use std:: sync:: { Arc , Mutex } ;
9-
10- // `termcolor` is needed because we cannot construct an Emitter after it was added in
11- // https://github.com/rust-lang/rust/pull/114104. This can be removed when
12- // https://github.com/rust-lang/rust/pull/115393 lands.
13- // We need to construct an emitter as yet another workaround,
14- // see https://github.com/rust-lang/rust/pull/102992.
15- extern crate termcolor;
169use termcolor:: { ColorSpec , WriteColor } ;
1710
1811// https://github.com/colin-kiegel/rust-pretty-assertions/issues/24
@@ -162,7 +155,6 @@ fn link_with_linker_opts(
162155 rustc_interface:: util:: rustc_version_str ( ) . unwrap_or ( "unknown" ) ,
163156 Default :: default ( ) ,
164157 & rustc_driver_impl:: USING_INTERNAL_FEATURES ,
165- Default :: default ( ) ,
166158 ) ;
167159
168160 // HACK(eddyb) inject `write_diags` into `sess`, to work around
@@ -171,7 +163,7 @@ fn link_with_linker_opts(
171163 let source_map = sess. psess . clone_source_map ( ) ;
172164
173165 let emitter = rustc_errors:: emitter:: HumanEmitter :: new (
174- Box :: new ( buf) ,
166+ rustc_errors :: AutoStream :: new ( Box :: new ( buf) , rustc_errors :: ColorChoice :: Never ) ,
175167 rustc_driver_impl:: default_translator ( ) ,
176168 )
177169 . sm ( Some ( source_map. clone ( ) ) ) ;
@@ -193,6 +185,7 @@ fn link_with_linker_opts(
193185 "" . into ( ) ,
194186 None ,
195187 None ,
188+ None ,
196189 "" . into ( ) ,
197190 OutputTypes :: new ( & [ ] ) ,
198191 ) ,
0 commit comments