fork/rust

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

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
2.3 KiB71 linesraw
1error: expected `,`, found `&`
2  --> $DIR/issue-66706.rs:2:16
3   |
4LL |     [0; [|_: _ &_| ()].len()]
5   |               -^ expected `,`
6   |               |
7   |               help: missing `,`
8
9error: expected identifier, found reserved identifier `_`
10  --> $DIR/issue-66706.rs:9:20
11   |
12LL |     [0; [|f @ &ref _| {} ; 0 ].len() ];
13   |                    ^ expected identifier, found reserved identifier
14
15error: expected `,`, found `&`
16  --> $DIR/issue-66706.rs:14:17
17   |
18LL |     [0; [|&_: _ &_| {}; 0 ].len()]
19   |                -^ expected `,`
20   |                |
21   |                help: missing `,`
22
23error: expected identifier, found reserved identifier `_`
24  --> $DIR/issue-66706.rs:20:26
25   |
26LL |     [0; match [|f @ &ref _| () ] {} ]
27   |                          ^ expected identifier, found reserved identifier
28
29error[E0658]: `match` is not allowed in a `const`
30  --> $DIR/issue-66706.rs:20:9
31   |
32LL |     [0; match [|f @ &ref _| () ] {} ]
33   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
34   |
35   = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
36   = help: add `#![feature(const_if_match)]` to the crate attributes to enable
37
38error[E0282]: type annotations needed
39  --> $DIR/issue-66706.rs:2:11
40   |
41LL |     [0; [|_: _ &_| ()].len()]
42   |           ^ consider giving this closure parameter a type
43
44error[E0308]: mismatched types
45  --> $DIR/issue-66706.rs:2:5
46   |
47LL | fn a() {
48   |        - help: try adding a return type: `-> [{integer}; _]`
49LL |     [0; [|_: _ &_| ()].len()]
50   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found array `[{integer}; _]`
51
52error[E0308]: mismatched types
53  --> $DIR/issue-66706.rs:14:5
54   |
55LL | fn c() {
56   |        - help: try adding a return type: `-> [{integer}; _]`
57LL |     [0; [|&_: _ &_| {}; 0 ].len()]
58   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found array `[{integer}; _]`
59
60error[E0308]: mismatched types
61  --> $DIR/issue-66706.rs:20:5
62   |
63LL | fn d() {
64   |        - help: try adding a return type: `-> [{integer}; _]`
65LL |     [0; match [|f @ &ref _| () ] {} ]
66   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found array `[{integer}; _]`
67
68error: aborting due to 9 previous errors
69
70Some errors have detailed explanations: E0282, E0308, E0658.
71For more information about an error, try `rustc --explain E0282`.