]> git.lizzy.rs Git - rust.git/blobdiff - tests/source/chains_with_comment.rs
fix internal error for long closure types (#3653)
[rust.git] / tests / source / chains_with_comment.rs
index 80c118d9eccbcf2af4a2742072eb659cb4b1459e..91160711b89099785c51657f04442a853c5bc06d 100644 (file)
@@ -93,3 +93,29 @@ fn dirty_rev_dep_graph(
             .map(|(k, deps)| (k.clone(), deps.iter().cloned().filter(|d| dirties.contains(&d)).collect()))
     }
 }
+
+// #2907
+fn foo() {
+    let x = foo
+        .bar??  ? // comment
+        .baz;
+    let x = foo
+        .bar?  ??
+    // comment
+        .baz;
+    let x = foo
+        .bar? ? ? // comment
+    // comment
+        .baz;
+    let x = foo
+        .bar? ?? // comment
+    // comment
+        ? ??
+    // comment
+        ?  ??
+    // comment
+        ???  
+    // comment
+        ? ? ?
+        .baz;
+}