fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
901 B28 linesraw
1error[E0658]: `match` is not allowed in a `const`
2  --> $DIR/const-match-pattern-arm.rs:3:17
3   |
4LL |   const x: bool = match Some(true) {
5   |  _________________^
6LL | |     Some(value) => true,
7LL | |     _ => false
8LL | | };
9   | |_^
10   |
11   = note: for more information, see https://github.com/rust-lang/rust/issues/49146
12   = help: add `#![feature(const_if_match)]` to the crate attributes to enable
13
14error[E0658]: `match` is not allowed in a `const`
15  --> $DIR/const-match-pattern-arm.rs:9:5
16   |
17LL | /     match Some(true) {
18LL | |         Some(value) => true,
19LL | |         _ => false
20LL | |     }
21   | |_____^
22   |
23   = note: for more information, see https://github.com/rust-lang/rust/issues/49146
24   = help: add `#![feature(const_if_match)]` to the crate attributes to enable
25
26error: aborting due to 2 previous errors
27
28For more information about this error, try `rustc --explain E0658`.