diff options
| author | bors <bors@rust-lang.org> | 2024-02-29 16:10:05 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-29 16:10:05 +0000 |
| commit | 1a1876c9790f168fb51afa335a7ba3e6fc267d75 (patch) | |
| tree | 3bd55c979127cf371e5059d7debb7e9e8677c160 /compiler/rustc_errors/src/json | |
| parent | 384d26fc7e3bdd7687cc17b2662b091f6017ec2a (diff) | |
| parent | 0e9f02d6fa769f1e96fc5e54af7b77b101bcc603 (diff) | |
| download | rust-1a1876c9790f168fb51afa335a7ba3e6fc267d75.tar.gz rust-1a1876c9790f168fb51afa335a7ba3e6fc267d75.zip | |
Auto merge of #121804 - GuillaumeGomez:rollup-jh0v3ex, r=GuillaumeGomez
Rollup of 7 pull requests Successful merges: - #119748 (Increase visibility of `join_path` and `split_paths`) - #120820 (Enable CMPXCHG16B, SSE3, SAHF/LAHF and 128-bit Atomics (in nightly) in Windows x64) - #121000 (pattern_analysis: rework how we hide empty private fields) - #121376 (Skip unnecessary comparison with half-open range patterns) - #121596 (Use volatile access instead of `#[used]` for `on_tls_callback`) - #121669 (Count stashed errors again) - #121783 (Emitter cleanups) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_errors/src/json')
| -rw-r--r-- | compiler/rustc_errors/src/json/tests.rs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/compiler/rustc_errors/src/json/tests.rs b/compiler/rustc_errors/src/json/tests.rs index 303de0a93f6..80b4d2bf75c 100644 --- a/compiler/rustc_errors/src/json/tests.rs +++ b/compiler/rustc_errors/src/json/tests.rs @@ -1,7 +1,7 @@ use super::*; -use crate::emitter::ColorConfig; use crate::DiagCtxt; +use rustc_span::source_map::FilePathMapping; use rustc_span::BytePos; use std::str; @@ -48,20 +48,14 @@ 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)); - let dcx = DiagCtxt::with_emitter(Box::new(je)); + let dcx = DiagCtxt::new(Box::new(je)); dcx.span_err(span, "foo"); let bytes = output.lock().unwrap(); |
