about summary refs log tree commit diff
path: root/tests/ui/errors/emitter-overflow-bad-whitespace.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/errors/emitter-overflow-bad-whitespace.rs')
-rw-r--r--tests/ui/errors/emitter-overflow-bad-whitespace.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/errors/emitter-overflow-bad-whitespace.rs b/tests/ui/errors/emitter-overflow-bad-whitespace.rs
new file mode 100644
index 00000000000..d024d1f3921
--- /dev/null
+++ b/tests/ui/errors/emitter-overflow-bad-whitespace.rs
@@ -0,0 +1,11 @@
+// Invalid whitespace (not listed here: https://doc.rust-lang.org/reference/whitespace.html
+// e.g. \u{a0}) before any other syntax on the line should not cause any integer overflow
+// in the emitter, even when the terminal width causes the line to be truncated.
+//
+// issue #132918
+
+//@ check-fail
+//@ needs-rustc-debug-assertions
+//@ compile-flags: --diagnostic-width=1
+                                         fn main() {              return;              }
+//~^ ERROR unknown start of token: \u{a0}