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
22 --> $DIR/closure-arg-count.rs:15:15
33 |
4415 | [1, 2, 3].sort_by(|| panic!());
55 | ^^^^^^^ -- takes 0 arguments
66 | |
77 | expected closure that takes 2 arguments
88
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
1010 --> $DIR/closure-arg-count.rs:16:15
1111 |
121216 | [1, 2, 3].sort_by(|tuple| panic!());
@@ -23,15 +23,15 @@ error[E0308]: mismatched types
2323 = note: expected type `&{integer}`
2424 found type `(_, _)`
2525
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
2727 --> $DIR/closure-arg-count.rs:17:15
2828 |
292917 | [1, 2, 3].sort_by(|(tuple, tuple2)| panic!());
3030 | ^^^^^^^ ----------------- takes 1 argument
3131 | |
3232 | expected closure that takes 2 arguments
3333
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
3535 --> $DIR/closure-arg-count.rs:18:5
3636 |
373718 | f(|| panic!());
@@ -41,27 +41,27 @@ error[E0593]: closure takes 0 arguments, but 1 argument is required
4141 |
4242 = note: required by `f`
4343
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
4545 --> $DIR/closure-arg-count.rs:20:53
4646 |
474720 | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x| i);
4848 | ^^^ ------ help: consider changing to: `|(i, x)|`
4949 | |
5050 | expected closure that takes 1 argument, a 2-tuple
5151
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
5353 --> $DIR/closure-arg-count.rs:21:53
5454 |
555521 | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i: usize, x| i);
5656 | ^^^ ------------- help: consider changing to: `|(i, x): (usize, _)|`
5757 | |
5858 | expected closure that takes 1 argument, a 2-tuple
5959
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
6161 --> $DIR/closure-arg-count.rs:22:53
6262 |
636322 | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x, y| i);
64- | ^^^ --------- takes 3 arguments
64+ | ^^^ --------- takes 3 distinct arguments
6565 | |
6666 | expected closure that takes 1 argument, a 2-tuple
6767
0 commit comments