@@ -2,11 +2,13 @@ error[E0593]: closure is expected to take 2 arguments, but it takes 0 arguments
22 --> $DIR/closure-arg-count.rs:15:15
33 |
44LL | [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+ | |
97 | 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+ | ^^^^^^
1012
1113error[E0593]: closure is expected to take 2 arguments, but it takes 1 argument
1214 --> $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
4446 --> $DIR/closure-arg-count.rs:23:5
4547 |
4648LL | f(|| panic!());
47- | ^ --
48- | | |
49- | | takes 0 arguments
50- | | help: change the closure to take and ignore the argument: `|_|`
49+ | ^ -- takes 0 arguments
50+ | |
5151 | expected closure that takes 1 argument
5252 |
5353note: required by `f`
5454 --> $DIR/closure-arg-count.rs:13:1
5555 |
5656LL | fn f<F: Fn<usize>>(_: F) {}
5757 | ^^^^^^^^^^^^^^^^^^^^^^^^
58+ help: change the closure to take and ignore the expected argument
59+ |
60+ LL | f(|_| panic!());
61+ | ^^^
5862
5963error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
6064 --> $DIR/closure-arg-count.rs:26:53
0 commit comments