@@ -2,11 +2,13 @@ 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
LL | [1, 2, 3].sort_by(|| panic!());
5
- | ^^^^^^^ --
6
- | | |
7
- | | takes 0 arguments
8
- | | help: change the closure to take and ignore the arguments: `|_, _|`
5
+ | ^^^^^^^ -- takes 0 arguments
6
+ | |
9
7
| expected closure that takes 2 arguments
8
+ help: change the closure to take and ignore the expected arguments
9
+ |
10
+ LL | [1, 2, 3].sort_by(|_, _| panic!());
11
+ | ^^^^^^
10
12
11
13
error[E0593]: closure is expected to take 2 arguments, but it takes 1 argument
12
14
--> $DIR/closure-arg-count.rs:17:15
@@ -44,17 +46,19 @@ error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments
44
46
--> $DIR/closure-arg-count.rs:23:5
45
47
|
46
48
LL | f(|| panic!());
47
- | ^ --
48
- | | |
49
- | | takes 0 arguments
50
- | | help: change the closure to take and ignore the argument: `|_|`
49
+ | ^ -- takes 0 arguments
50
+ | |
51
51
| expected closure that takes 1 argument
52
52
|
53
53
note: required by `f`
54
54
--> $DIR/closure-arg-count.rs:13:1
55
55
|
56
56
LL | fn f<F: Fn<usize>>(_: F) {}
57
57
| ^^^^^^^^^^^^^^^^^^^^^^^^
58
+ help: change the closure to take and ignore the expected argument
59
+ |
60
+ LL | f(|_| panic!());
61
+ | ^^^
58
62
59
63
error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
60
64
--> $DIR/closure-arg-count.rs:26:53
0 commit comments