]> git.proxmox.com Git - rustc.git/blame - src/test/ui/return/return-match-array-const.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / return / return-match-array-const.stderr
CommitLineData
60c5eb7d
XL
1error[E0658]: `match` is not allowed in a `const`
2 --> $DIR/return-match-array-const.rs:2:17
3 |
4LL | [(); return match 0 { n => n }];
5 | ^^^^^^^^^^^^^^^^^^
6 |
7 = note: for more information, see https://github.com/rust-lang/rust/issues/49146
8 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
9
10error[E0658]: `match` is not allowed in a `const`
11 --> $DIR/return-match-array-const.rs:6:17
12 |
13LL | [(); return match 0 { 0 => 0 }];
14 | ^^^^^^^^^^^^^^^^^^
15 |
16 = note: for more information, see https://github.com/rust-lang/rust/issues/49146
17 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
18
19error[E0658]: `match` is not allowed in a `const`
20 --> $DIR/return-match-array-const.rs:10:17
21 |
22LL | [(); return match () { 'a' => 0, _ => 0 }];
23 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24 |
25 = note: for more information, see https://github.com/rust-lang/rust/issues/49146
26 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
27
8faf50e0 28error[E0572]: return statement outside of function body
0731742a 29 --> $DIR/return-match-array-const.rs:2:10
8faf50e0 30 |
532ac7d7 31LL | [(); return match 0 { n => n }];
8faf50e0
XL
32 | ^^^^^^^^^^^^^^^^^^^^^^^^^
33
34error[E0572]: return statement outside of function body
60c5eb7d 35 --> $DIR/return-match-array-const.rs:6:10
8faf50e0 36 |
532ac7d7 37LL | [(); return match 0 { 0 => 0 }];
8faf50e0
XL
38 | ^^^^^^^^^^^^^^^^^^^^^^^^^
39
40error[E0572]: return statement outside of function body
60c5eb7d 41 --> $DIR/return-match-array-const.rs:10:10
8faf50e0 42 |
532ac7d7 43LL | [(); return match () { 'a' => 0, _ => 0 }];
8faf50e0
XL
44 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45
60c5eb7d 46error: aborting due to 6 previous errors
8faf50e0 47
60c5eb7d
XL
48Some errors have detailed explanations: E0572, E0658.
49For more information about an error, try `rustc --explain E0572`.