about summary refs log tree commit diff
path: root/tests/ui/diagnostic-width/flag-human.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/diagnostic-width/flag-human.rs')
-rw-r--r--tests/ui/diagnostic-width/flag-human.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/diagnostic-width/flag-human.rs b/tests/ui/diagnostic-width/flag-human.rs
new file mode 100644
index 00000000000..289bfbabd94
--- /dev/null
+++ b/tests/ui/diagnostic-width/flag-human.rs
@@ -0,0 +1,9 @@
+// compile-flags: --diagnostic-width=20
+
+// This test checks that `-Z output-width` effects the human error output by restricting it to an
+// arbitrarily low value so that the effect is visible.
+
+fn main() {
+    let _: () = 42;
+    //~^ ERROR mismatched types
+}