@@ -7,21 +7,21 @@ LL | [0; [|_: _ &_| ()].len()]
7
7
| help: missing `,`
8
8
9
9
error: expected identifier, found reserved identifier `_`
10
- --> $DIR/issue-66706.rs:9 :20
10
+ --> $DIR/issue-66706.rs:8 :20
11
11
|
12
12
LL | [0; [|f @ &ref _| {} ; 0 ].len() ];
13
13
| ^ expected identifier, found reserved identifier
14
14
15
15
error: expected `,`, found `&`
16
- --> $DIR/issue-66706.rs:14 :17
16
+ --> $DIR/issue-66706.rs:13 :17
17
17
|
18
18
LL | [0; [|&_: _ &_| {}; 0 ].len()]
19
19
| -^ expected `,`
20
20
| |
21
21
| help: missing `,`
22
22
23
23
error: expected identifier, found reserved identifier `_`
24
- --> $DIR/issue-66706.rs:20 :26
24
+ --> $DIR/issue-66706.rs:18 :26
25
25
|
26
26
LL | [0; match [|f @ &ref _| () ] {} ]
27
27
| ^ expected identifier, found reserved identifier
@@ -32,31 +32,6 @@ error[E0282]: type annotations needed
32
32
LL | [0; [|_: _ &_| ()].len()]
33
33
| ^ cannot infer type
34
34
35
- error[E0308]: mismatched types
36
- --> $DIR/issue-66706.rs:2:5
37
- |
38
- LL | fn a() {
39
- | - help: try adding a return type: `-> [i32; _]`
40
- LL | [0; [|_: _ &_| ()].len()]
41
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found array `[{integer}; _]`
42
-
43
- error[E0308]: mismatched types
44
- --> $DIR/issue-66706.rs:14:5
45
- |
46
- LL | fn c() {
47
- | - help: try adding a return type: `-> [i32; _]`
48
- LL | [0; [|&_: _ &_| {}; 0 ].len()]
49
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found array `[{integer}; _]`
50
-
51
- error[E0308]: mismatched types
52
- --> $DIR/issue-66706.rs:20:5
53
- |
54
- LL | fn d() {
55
- | - help: try adding a return type: `-> [i32; _]`
56
- LL | [0; match [|f @ &ref _| () ] {} ]
57
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found array `[{integer}; _]`
58
-
59
- error: aborting due to 8 previous errors
35
+ error: aborting due to 5 previous errors
60
36
61
- Some errors have detailed explanations: E0282, E0308.
62
- For more information about an error, try `rustc --explain E0282`.
37
+ For more information about this error, try `rustc --explain E0282`.
0 commit comments