Skip to content

Commit f5a09a9

Browse files
committed
Unbreak tests/ui/lint/use_suggestion_json.rs.
PR rust-lang#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.
1 parent 453ffac commit f5a09a9

File tree

2 files changed

+423
-3
lines changed

2 files changed

+423
-3
lines changed

tests/ui/lint/use_suggestion_json.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ignore-windows
22
// ignore-sgx std::os::fortanix_sgx::usercalls::alloc::Iter changes compiler suggestions
3-
// compile-flags: --error-format pretty-json --json=diagnostic-rendered-ansi
3+
// compile-flags: --error-format pretty-json --json=diagnostic-rendered-ansi -Z unstable-options
44

55
// The output for humans should just highlight the whole span without showing
66
// the suggested replacement, but we also want to test that suggested

0 commit comments

Comments
 (0)