From f107bb85a21bbf5824854fbf0f2546505f4732a0 Mon Sep 17 00:00:00 2001 From: Zalathar Date: Sun, 26 Apr 2026 21:33:38 +1000 Subject: [PATCH] Regression test for improper spans in inclusive-range suggestions --- tests/ui/parser/range-inclusive-suggestion-span.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/ui/parser/range-inclusive-suggestion-span.rs diff --git a/tests/ui/parser/range-inclusive-suggestion-span.rs b/tests/ui/parser/range-inclusive-suggestion-span.rs new file mode 100644 index 000000000000..eed115d0ac89 --- /dev/null +++ b/tests/ui/parser/range-inclusive-suggestion-span.rs @@ -0,0 +1,14 @@ +#![crate_type = "rlib"] + +// Suggestions for range patterns should not perform span manipulations that +// assume the range token is ASCII, because it could have been recovered from +// similar-looking Unicode characters. +// +// Regression test for . + +// FIXME: The ICE is fixed in a subsequent commit. +//@ known-bug: #155799 +//@ failure-status: 101 + +// These dots are U+00B7 MIDDLE DOT, not an ASCII period. +fn dot_dot_dot() { ยทยทยท }