about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/ui-fulldeps/pprust-parenthesis-insertion.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/ui-fulldeps/pprust-parenthesis-insertion.rs b/tests/ui-fulldeps/pprust-parenthesis-insertion.rs
index f535db06879..6535367927e 100644
--- a/tests/ui-fulldeps/pprust-parenthesis-insertion.rs
+++ b/tests/ui-fulldeps/pprust-parenthesis-insertion.rs
@@ -73,6 +73,9 @@ static EXPRS: &[&str] = &[
     // Closures and jumps have equal precedence.
     "|| return break 2",
     "return break || 2",
+    // Closures with a return type have especially high precedence.
+    "(|| -> T { x }) + 1", // FIXME: no parenthesis needed.
+    "(|| { x }) + 1",
     // These mean different things.
     "if let _ = true && false {}",
     "if let _ = (true && false) {}",