@@ -6,16 +6,8 @@ error[E0308]: mismatched types
6
6
|
7
7
= note: expected type `[closure@$DIR/issue-24036.rs:12:17: 12:26]`
8
8
found type `[closure@$DIR/issue-24036.rs:13:9: 13:18]`
9
- note: no two closures, even if identical, have the same type
10
- --> $DIR/issue-24036.rs:13:9
11
- |
12
- 13 | x = |c| c + 1;
13
- | ^^^^^^^^^
14
- help: consider boxing your closure and/or using it as a trait object
15
- --> $DIR/issue-24036.rs:13:9
16
- |
17
- 13 | x = |c| c + 1;
18
- | ^^^^^^^^^
9
+ = note: no two closures, even if identical, have the same type
10
+ = help: consider boxing your closure and/or using it as a trait object
19
11
20
12
error[E0308]: match arms have incompatible types
21
13
--> $DIR/issue-24036.rs:18:13
@@ -31,28 +23,8 @@ error[E0308]: match arms have incompatible types
31
23
|
32
24
= note: expected type `[closure@$DIR/issue-24036.rs:20:14: 20:23]`
33
25
found type `[closure@$DIR/issue-24036.rs:21:14: 21:23]`
34
- note: no two closures, even if identical, have the same type
35
- --> $DIR/issue-24036.rs:18:13
36
- |
37
- 18 | let x = match 1usize {
38
- | _____________^
39
- 19 | | //~^ ERROR match arms have incompatible types
40
- 20 | | 1 => |c| c + 1,
41
- 21 | | 2 => |c| c - 1,
42
- 22 | | _ => |c| c - 1
43
- 23 | | };
44
- | |_____^
45
- help: consider boxing your closure and/or using it as a trait object
46
- --> $DIR/issue-24036.rs:18:13
47
- |
48
- 18 | let x = match 1usize {
49
- | _____________^
50
- 19 | | //~^ ERROR match arms have incompatible types
51
- 20 | | 1 => |c| c + 1,
52
- 21 | | 2 => |c| c - 1,
53
- 22 | | _ => |c| c - 1
54
- 23 | | };
55
- | |_____^
26
+ = note: no two closures, even if identical, have the same type
27
+ = help: consider boxing your closure and/or using it as a trait object
56
28
note: match arm with an incompatible type
57
29
--> $DIR/issue-24036.rs:21:14
58
30
|
0 commit comments