about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/json/tests.rs
diff options
context:
space:
mode:
authorjyn <github@jyn.dev>2024-12-21 10:06:07 -0500
committerjyn <github@jyn.dev>2025-01-20 16:46:45 -0500
commitb757663a00260e22799a1bbdc5d6ba603e4bb30d (patch)
tree4a78b3924fb7f6bfd37ef6cf9e2b19e8082f0eb0 /compiler/rustc_errors/src/json/tests.rs
parentcedd4cad21298ca8b825ab3c56a84753176dc8e8 (diff)
downloadrust-b757663a00260e22799a1bbdc5d6ba603e4bb30d.tar.gz
rust-b757663a00260e22799a1bbdc5d6ba603e4bb30d.zip
don't ICE when emitting linker errors during `-Z link-only`
note that this still ICEs when passed `-Z link-only --error-format json` because i can't be bothered to fix it right now
Diffstat (limited to 'compiler/rustc_errors/src/json/tests.rs')
-rw-r--r--compiler/rustc_errors/src/json/tests.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/json/tests.rs b/compiler/rustc_errors/src/json/tests.rs
index 0de555b83d3..cebaf7c1cfe 100644
--- a/compiler/rustc_errors/src/json/tests.rs
+++ b/compiler/rustc_errors/src/json/tests.rs
@@ -47,7 +47,7 @@ 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() }),
-            sm,
+            Some(sm),
             fallback_bundle,
             true, // pretty
             HumanReadableErrorType::Short,