diff options
Diffstat (limited to 'tests/ui/diagnostic-width/flag-json.rs')
-rw-r--r-- | tests/ui/diagnostic-width/flag-json.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/diagnostic-width/flag-json.rs b/tests/ui/diagnostic-width/flag-json.rs new file mode 100644 index 000000000..51a1fb447 --- /dev/null +++ b/tests/ui/diagnostic-width/flag-json.rs @@ -0,0 +1,9 @@ +// compile-flags: --diagnostic-width=20 --error-format=json + +// This test checks that `-Z output-width` effects the JSON error output by restricting it to an +// arbitrarily low value so that the effect is visible. + +fn main() { + let _: () = 42; + //~^ ERROR arguments to this function are incorrect +} |