From 9ff4487999ccd02065ec56fdc8cee665feae9680 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 29 Feb 2024 16:03:59 +1100 Subject: 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. --- compiler/rustc_errors/src/json/tests.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'compiler/rustc_errors/src/json') 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)); -- cgit 1.4.1-3-g733a5