about summary refs log tree commit diff
path: root/tests/ui/lint/use_suggestion_json.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-01-05 14:19:02 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-01-05 14:24:06 +1100
commitf5a09a9e1d162793d16b53cd6ad266a37e11d800 (patch)
tree44fd2683a5a6b1f97c8f76965054151ae7b48b5f /tests/ui/lint/use_suggestion_json.rs
parent453fface11dbe314fcdf1e0558ad084600c0b1f5 (diff)
downloadrust-f5a09a9e1d162793d16b53cd6ad266a37e11d800.tar.gz
rust-f5a09a9e1d162793d16b53cd6ad266a37e11d800.zip
Unbreak `tests/ui/lint/use_suggestion_json.rs`.
PR #82639 changed UI tests so `-Z unstable-options` aren't passed to UI
tests by default. This completely broke `use_suggestion_json.rs`, which
uses the unstable `--error-format=pretty-json` option. The expected
output went from 400 lines of pretty JSON error messages to a single
JSON error saying "`--error-format=pretty-json` is unstable"!

This commit adds `-Z unstable-options` back and reinstates the old
expected output, with some minor changes to account for shifted spans
and slightly JSON output changes since then.
Diffstat (limited to 'tests/ui/lint/use_suggestion_json.rs')
-rw-r--r--tests/ui/lint/use_suggestion_json.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ui/lint/use_suggestion_json.rs b/tests/ui/lint/use_suggestion_json.rs
index 7d641e08bf0..6a947f14302 100644
--- a/tests/ui/lint/use_suggestion_json.rs
+++ b/tests/ui/lint/use_suggestion_json.rs
@@ -1,6 +1,6 @@
 // ignore-windows
 // ignore-sgx std::os::fortanix_sgx::usercalls::alloc::Iter changes compiler suggestions
-// compile-flags: --error-format pretty-json --json=diagnostic-rendered-ansi
+// compile-flags: --error-format pretty-json --json=diagnostic-rendered-ansi -Z unstable-options
 
 // The output for humans should just highlight the whole span without showing
 // the suggested replacement, but we also want to test that suggested