]> git.proxmox.com Git - rustc.git/blob - 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
1 error[E0658]: `match` is not allowed in a `const`
2 --> $DIR/return-match-array-const.rs:2:17
3 |
4 LL | [(); 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
10 error[E0658]: `match` is not allowed in a `const`
11 --> $DIR/return-match-array-const.rs:6:17
12 |
13 LL | [(); 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
19 error[E0658]: `match` is not allowed in a `const`
20 --> $DIR/return-match-array-const.rs:10:17
21 |
22 LL | [(); 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
28 error[E0572]: return statement outside of function body
29 --> $DIR/return-match-array-const.rs:2:10
30 |
31 LL | [(); return match 0 { n => n }];
32 | ^^^^^^^^^^^^^^^^^^^^^^^^^
33
34 error[E0572]: return statement outside of function body
35 --> $DIR/return-match-array-const.rs:6:10
36 |
37 LL | [(); return match 0 { 0 => 0 }];
38 | ^^^^^^^^^^^^^^^^^^^^^^^^^
39
40 error[E0572]: return statement outside of function body
41 --> $DIR/return-match-array-const.rs:10:10
42 |
43 LL | [(); return match () { 'a' => 0, _ => 0 }];
44 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45
46 error: aborting due to 6 previous errors
47
48 Some errors have detailed explanations: E0572, E0658.
49 For more information about an error, try `rustc --explain E0572`.