about summary refs log tree commit diff
path: root/tests/ui/suggestions/only-replace-intended-coma-not-all-in-pattern.stderr
blob: ee75e2db1334c2e94868a66dfc5b56de1408fea6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
error: unexpected `,` in pattern
  --> $DIR/only-replace-intended-coma-not-all-in-pattern.rs:12:30
   |
LL |         Foo { x: 2, ch: ',' }, Foo { x: 3, ch: '@' } => (),
   |                              ^
   |
help: try adding parentheses to match on a tuple...
   |
LL |         (Foo { x: 2, ch: ',' }, Foo { x: 3, ch: '@' }) => (),
   |         +                                            +
help: ...or a vertical bar to match on alternatives
   |
LL -         Foo { x: 2, ch: ',' }, Foo { x: 3, ch: '@' } => (),
LL +         Foo { x: 2, ch: ',' } | Foo { x: 3, ch: '@' } => (),
   |

error: aborting due to 1 previous error