Skip to content

Commit 8432964

Browse files
authored
Restore comment specific to match/case
1 parent 52d1a41 commit 8432964

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

parser/src/soft_keywords.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ where
5454
// 1. The token is at the start of a logical line.
5555
// 2. The logical line contains a top-level colon (that is, a colon that is not nested
5656
// inside a parenthesized expression, list, or dictionary).
57-
// 3. The top-level colon is not the immediate sibling of a soft keyword token.
58-
// (This is to avoid treating soft keywords as identifiers when annotated with
57+
// 3. The top-level colon is not the immediate sibling of a `match` or `case` token.
58+
// (This is to avoid treating `match` or `case` as identifiers when annotated with
5959
// type hints.)
6060
if matches!(tok, Tok::Match | Tok::Case) {
6161
if !self.start_of_line {

0 commit comments

Comments
 (0)