about summary refs log tree commit diff
path: root/tests/ui/missing/missing-comma-in-match.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/missing/missing-comma-in-match.fixed')
-rw-r--r--tests/ui/missing/missing-comma-in-match.fixed11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/missing/missing-comma-in-match.fixed b/tests/ui/missing/missing-comma-in-match.fixed
new file mode 100644
index 00000000000..f091082f35f
--- /dev/null
+++ b/tests/ui/missing/missing-comma-in-match.fixed
@@ -0,0 +1,11 @@
+// run-rustfix
+
+fn main() {
+    match &Some(3) {
+        &None => 1,
+        &Some(2) => { 3 }
+        //~^ ERROR expected one of `,`, `.`, `?`, `}`, or an operator, found `=>`
+        //~| NOTE expected one of `,`, `.`, `?`, `}`, or an operator
+        _ => 2
+    };
+}