Closed
Description
If I compile this:
fn main() {
let _b = matches!(b'3', b'0' ..= b'9');
}
With:
rustc 1.53.0-nightly (b84932674 2021-04-21)
binary: rustc
commit-hash: b849326744a8eec939e592f0ab13bff85cc865d3
commit-date: 2021-04-21
host: x86_64-pc-windows-gnu
release: 1.53.0-nightly
LLVM version: 12.0.0
If I use the command:
...>rustc --edition 2018 -Z unstable-options test.rs
The compilation seems OK. If I compile with:
...>rustc --edition 2021 -Z unstable-options test.rs
rustc gives an error without line numbers:
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