mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-24 13:43:04 +00:00
3c2a709620
fix `matches!` and `assert_matches!` on edition 2021 Previously this code failed to compile on edition 2021. [(Playground)](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=53960f2f051f641777b9e458da747707) ```rust fn main() { matches!((), ()); } ``` ``` Compiling playground v0.0.1 (/playground) error: `$pattern:pat` may be followed by `|`, which is not allowed for `pat` fragments | = note: allowed there are: `=>`, `,`, `=`, `if` or `in` error: aborting due to previous error error: could not compile `playground` To learn more, run the command again with --verbose. ``` |
||
---|---|---|
.. | ||
benches | ||
src | ||
tests | ||
Cargo.toml |