Skip to content

Commit c95f9f5

Browse files
committed
Add pretty-printer test of tuple field function call
1 parent e5f0d6f commit c95f9f5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

+3
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ static EXPRS: &[&str] = &[
7777
// These mean different things.
7878
"if let _ = true && false {}",
7979
"if let _ = (true && false) {}",
80+
// Parentheses to call a named field, but not an unnamed field.
81+
"(self.fun)()",
82+
"(self.0)()", // FIXME: no parenthesis needed.
8083
// Conditions end at the first curly brace, so struct expressions need to be
8184
// parenthesized. Except in a match guard, where conditions end at arrow.
8285
"if let _ = (Struct {}) {}",

0 commit comments

Comments
 (0)