about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-02-29 16:03:59 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-02-29 17:50:26 +1100
commit9ff4487999ccd02065ec56fdc8cee665feae9680 (patch)
tree37a6eb3f8c29c6e3979ef764eb8baa7336f83db3 /src
parent2999d8dc72e9ed9e895d6a9e2d3d34f1cd4370ba (diff)
downloadrust-9ff4487999ccd02065ec56fdc8cee665feae9680.tar.gz
rust-9ff4487999ccd02065ec56fdc8cee665feae9680.zip
Make `JsonEmitter` more like `HumanEmitter`.
Use `derive(Setters)` to derive setters, and then change
`JsonEmitter::new` to only have the arguments that are always used.
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/core.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs
index 463b8385d43..9ba79cf5d29 100644
--- a/src/librustdoc/core.rs
+++ b/src/librustdoc/core.rs
@@ -158,18 +158,15 @@ pub(crate) fn new_dcx(
             Box::new(
                 JsonEmitter::new(
                     Box::new(io::BufWriter::new(io::stderr())),
-                    None,
                     source_map,
-                    None,
                     fallback_bundle,
                     pretty,
                     json_rendered,
-                    diagnostic_width,
-                    false,
-                    unstable_opts.track_diagnostics,
-                    TerminalUrl::No,
                 )
-                .ui_testing(unstable_opts.ui_testing),
+                .ui_testing(unstable_opts.ui_testing)
+                .diagnostic_width(diagnostic_width)
+                .track_diagnostics(unstable_opts.track_diagnostics)
+                .terminal_url(TerminalUrl::No),
             )
         }
     };