mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-30 22:47:32 +00:00
19 lines
629 B
Plaintext
19 lines
629 B
Plaintext
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
|
|
|