diff options
| author | bors <bors@rust-lang.org> | 2023-08-04 18:46:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-08-04 18:46:19 +0000 |
| commit | fe896efa974ea759b10b9754234ae61e9cab28b3 (patch) | |
| tree | 9f0c8dac1acdddb059778b0708fb0ea786e8963b /compiler/rustc_errors/src/lib.rs | |
| parent | 03181e0547c1e15a2c0431337b2d5ee00fd0374c (diff) | |
| parent | 375d8f1b25b12d252e6aff030c0bcf64b77f886b (diff) | |
| download | rust-fe896efa974ea759b10b9754234ae61e9cab28b3.tar.gz rust-fe896efa974ea759b10b9754234ae61e9cab28b3.zip | |
Auto merge of #114104 - oli-obk:syn2, r=compiler-errors
Lots of tiny incremental simplifications of `EmitterWriter` internals ignore the first commit, it's https://github.com/rust-lang/rust/pull/114088 squashed and rebased, but it's needed to use to use `derive_setters`, as they need a newer `syn` version. Then this PR starts out with removing many arguments that are almost always defaulted to `None` or `false` and replace them with builder methods that can set these fields in the few cases that want to set them. After that it's one commit after the other that removes or merges things until everything becomes some very simple trait objects
Diffstat (limited to 'compiler/rustc_errors/src/lib.rs')
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 3b753629128..7d660d2dbaa 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -557,18 +557,7 @@ impl Handler { sm: Option<Lrc<SourceMap>>, fallback_bundle: LazyFallbackBundle, ) -> Self { - let emitter = Box::new(EmitterWriter::stderr( - ColorConfig::Auto, - sm, - None, - fallback_bundle, - false, - false, - None, - false, - false, - TerminalUrl::No, - )); + let emitter = Box::new(EmitterWriter::stderr(ColorConfig::Auto, fallback_bundle).sm(sm)); Self::with_emitter(emitter) } pub fn disable_warnings(mut self) -> Self { |
