1
- error[E0593]: closure takes 0 arguments, but 2 arguments are required
1
+ error[E0593]: closure is expected to take 2 arguments, but it takes 0 arguments
2
2
--> $DIR/closure-arg-count.rs:15:15
3
3
|
4
4
15 | [1, 2, 3].sort_by(|| panic!());
5
5
| ^^^^^^^ -- takes 0 arguments
6
6
| |
7
7
| expected closure that takes 2 arguments
8
8
9
- error[E0593]: closure takes 1 argument, but 2 arguments are required
9
+ error[E0593]: closure is expected to take 2 arguments, but it takes 1 argument
10
10
--> $DIR/closure-arg-count.rs:16:15
11
11
|
12
12
16 | [1, 2, 3].sort_by(|tuple| panic!());
@@ -23,15 +23,15 @@ error[E0308]: mismatched types
23
23
= note: expected type `&{integer}`
24
24
found type `(_, _)`
25
25
26
- error[E0593]: closure takes 1 argument, but 2 arguments are required
26
+ error[E0593]: closure is expected to take 2 arguments, but it takes 1 argument
27
27
--> $DIR/closure-arg-count.rs:17:15
28
28
|
29
29
17 | [1, 2, 3].sort_by(|(tuple, tuple2)| panic!());
30
30
| ^^^^^^^ ----------------- takes 1 argument
31
31
| |
32
32
| expected closure that takes 2 arguments
33
33
34
- error[E0593]: closure takes 0 arguments, but 1 argument is required
34
+ error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments
35
35
--> $DIR/closure-arg-count.rs:18:5
36
36
|
37
37
18 | f(|| panic!());
@@ -41,27 +41,27 @@ error[E0593]: closure takes 0 arguments, but 1 argument is required
41
41
|
42
42
= note: required by `f`
43
43
44
- error[E0593]: closure takes multiple arguments, but a tuple argument is required
44
+ error[E0593]: closure is expected to take a single tuple as argument, but it takes 2 distinct arguments
45
45
--> $DIR/closure-arg-count.rs:20:53
46
46
|
47
47
20 | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x| i);
48
48
| ^^^ ------ help: consider changing to: `|(i, x)|`
49
49
| |
50
50
| expected closure that takes 1 argument, a 2-tuple
51
51
52
- error[E0593]: closure takes multiple arguments, but a tuple argument is required
52
+ error[E0593]: closure is expected to take a single tuple as argument, but it takes 2 distinct arguments
53
53
--> $DIR/closure-arg-count.rs:21:53
54
54
|
55
55
21 | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i: usize, x| i);
56
56
| ^^^ ------------- help: consider changing to: `|(i, x): (usize, _)|`
57
57
| |
58
58
| expected closure that takes 1 argument, a 2-tuple
59
59
60
- error[E0593]: closure takes multiple arguments, but a tuple argument is required
60
+ error[E0593]: closure is expected to take a single tuple as argument, but it takes 3 distinct arguments
61
61
--> $DIR/closure-arg-count.rs:22:53
62
62
|
63
63
22 | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x, y| i);
64
- | ^^^ --------- takes 3 arguments
64
+ | ^^^ --------- takes 3 distinct arguments
65
65
| |
66
66
| expected closure that takes 1 argument, a 2-tuple
67
67
0 commit comments