]> git.lizzy.rs Git - rust.git/blobdiff - tests/source/expr.rs
Prevent duplicate comma when formatting struct pattern with ".."
[rust.git] / tests / source / expr.rs
index 8a6e6f1aa2bcd48952f5b25adccea244f10774ab..21f8a4a43668a1905c55d82aef3e3d860c227f30 100644 (file)
@@ -567,3 +567,13 @@ fn foo() {
     }
         .await;
 }
+
+fn underscore() {
+        _= 1;
+        _;
+        [  _,a,_  ] = [1, 2, 3];
+    (a,   _) = (8, 9);
+    TupleStruct(  _, a) = TupleStruct(2, 2);
+
+    let _  : usize = foo(_, _);
+}