Skip to content

Commit 7c4b21e

Browse files
Rollup merge of rust-lang#155279 - Sandijigs:test/lexer-unicode-pattern-white-space, r=jdonszelmann
Test/lexer unicode pattern white space This PR adds a test for the Rust lexer to verify it correctly accepts vertical tab (`\x0B`) as valid whitespace between tokens. Vertical tab is part of Unicode Pattern_White_Space, which the Rust language specification uses to define whitespace. Related: Outreachy tracking [Pattern_White_Space](https://www.unicode.org/reports/tr31/#R3a)
2 parents 2bf5356 + 7d4b12b commit 7c4b21e

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//@ run-pass
2+
// Test that the Rust lexer accepts vertical tab (\x0B) as valid whitespace
3+
// between tokens. Vertical tab is part of Unicode Pattern_White_Space, which
4+
// the Rust language specification uses to define whitespace tokens.
5+
// See: https://unicode.org/reports/tr31/#Pattern_White_Space
6+
//
7+
// The space between "let" and "_" below is a vertical tab character (\x0B),
8+
// not a regular space.
9+
10+
fn main() {
11+
let _ = 1;
12+
}

0 commit comments

Comments
 (0)