You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Invalid suggestion to use a vertical bar in let a, b = x; #61573
error: unexpected `,` in pattern
--> src/main.rs:2:10
|
2 | let a, b = x;
| ^
help: try adding parentheses to match on a tuple..
|
2 | let (a, b) = x;
| ^^^^^^
help: ..or a vertical bar to match on multiple alternatives
|
2 | let a | b = x;
| ^^^^^
However, the suggestion let a | b = x; is nonsensical.
Activity
petrochenkov commentedon Jun 6, 2019
let a | bis supposed to work eventually (#48215, #54883), but it's not yet implemented.goffrie commentedon Jun 7, 2019
I see. However, in this case,
a | bwould still not be a legal pattern.compiler-errors commentedon Aug 13, 2022
This was resolved.