rust/src/librustc_errors
Alex Crichton 255cc1aed3 rustc: Request ansi colors if stderr isn't a tty
Currently Cargo will always capture the output of rustc meaning that
rustc is never hooked up to a tty. To retain colors Cargo uses the
`fwdansi` crate to ensure that ansi color codes are translated to
windows terminal methods (and ansi codes otherwise just go their natural
route on Unix).

Cargo passes `--color always` to rustc to ensure that using a pipe
doesn't trick it into not emitting colors at all. It turns out, however,
that `--color always` ends up still accidentally using the native shell
api on native windows shells.

The fix here is to instead pass `AlwaysAnsi` to `termcolor` instead of
`Always`, ensuring that when `--color always` is passed to rustc and its
output isn't a terminal, we're always generating ansi colors regardless
of the platform.

Closes #55769
2018-11-08 07:53:03 -08:00
..
Cargo.toml Log when buffering a diagnostic. 2018-09-18 13:45:24 +02:00
diagnostic_builder.rs Pass suggestions as impl Iterator instead of Vec 2018-10-31 13:56:20 +01:00
diagnostic.rs Pass suggestions as impl Iterator instead of Vec 2018-10-31 13:56:20 +01:00
emitter.rs rustc: Request ansi colors if stderr isn't a tty 2018-11-08 07:53:03 -08:00
lib.rs Rename other occs of (Code/File)Map to Source(Map/File) #51574 2018-10-29 21:26:13 +01:00
lock.rs Fix compiling some rustc crates to wasm 2018-09-07 08:17:02 -07:00
registry.rs Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc. 2018-08-28 17:04:04 +03:00
snippet.rs
styled_buffer.rs