Skip to content

Commit fef8ec5

Browse files
committed
Add test of dot after eager statement boundary expr
1 parent e5f0d6f commit fef8ec5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/ui-fulldeps/pprust-parenthesis-insertion.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ static EXPRS: &[&str] = &[
108108
"{ (match 2 {})() - 1 }",
109109
"{ (match 2 {})[0] - 1 }",
110110
"{ (loop {}) - 1 }",
111+
"match 2 { _ => (loop {}) - 1 }",
112+
// No eager statement boundary if followed by `.` or `?`.
113+
"{ (loop {}).to_string() - 1 }", // FIXME: no parenthesis needed.
114+
"match 2 { _ => (loop {}).to_string() - 1 }", // FIXME: no parenthesis needed.
111115
// Angle bracket is eagerly parsed as a path's generic argument list.
112116
"(2 as T) < U",
113117
"(2 as T<U>) < V", // FIXME: no parentheses needed.

0 commit comments

Comments
 (0)