diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-29 16:03:59 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-29 17:50:26 +1100 |
| commit | 9ff4487999ccd02065ec56fdc8cee665feae9680 (patch) | |
| tree | 37a6eb3f8c29c6e3979ef764eb8baa7336f83db3 /compiler/rustc_errors/src/json | |
| parent | 2999d8dc72e9ed9e895d6a9e2d3d34f1cd4370ba (diff) | |
| download | rust-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 'compiler/rustc_errors/src/json')
| -rw-r--r-- | compiler/rustc_errors/src/json/tests.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/compiler/rustc_errors/src/json/tests.rs b/compiler/rustc_errors/src/json/tests.rs index fc9948cb2fc..80b4d2bf75c 100644 --- a/compiler/rustc_errors/src/json/tests.rs +++ b/compiler/rustc_errors/src/json/tests.rs @@ -48,16 +48,10 @@ fn test_positions(code: &str, span: (u32, u32), expected_output: SpanTestData) { let output = Arc::new(Mutex::new(Vec::new())); let je = JsonEmitter::new( Box::new(Shared { data: output.clone() }), - None, sm, - None, fallback_bundle, - true, + true, // pretty HumanReadableErrorType::Short(ColorConfig::Never), - None, - false, - false, - TerminalUrl::No, ); let span = Span::with_root_ctxt(BytePos(span.0), BytePos(span.1)); |
