1 error[E0593]: closure is expected to take 2 arguments, but it takes 0 arguments
2 --> $DIR/closure-arg-count.rs:15:15
4 LL | [1, 2, 3].sort_by(|| panic!());
5 | ^^^^^^^ -- takes 0 arguments
7 | expected closure that takes 2 arguments
9 error[E0593]: closure is expected to take 2 arguments, but it takes 1 argument
10 --> $DIR/closure-arg-count.rs:17:15
12 LL | [1, 2, 3].sort_by(|tuple| panic!());
13 | ^^^^^^^ ------- takes 1 argument
15 | expected closure that takes 2 arguments
17 error[E0593]: closure is expected to take 2 distinct arguments, but it takes a single 2-tuple as argument
18 --> $DIR/closure-arg-count.rs:19:15
20 LL | [1, 2, 3].sort_by(|(tuple, tuple2)| panic!());
21 | ^^^^^^^ ----------------- takes a single 2-tuple as argument
23 | expected closure that takes 2 distinct arguments
24 help: change the closure to take multiple arguments instead of a single tuple
26 LL | [1, 2, 3].sort_by(|tuple, tuple2| panic!());
29 error[E0593]: closure is expected to take 2 distinct arguments, but it takes a single 2-tuple as argument
30 --> $DIR/closure-arg-count.rs:21:15
32 LL | [1, 2, 3].sort_by(|(tuple, tuple2): (usize, _)| panic!());
33 | ^^^^^^^ ----------------------------- takes a single 2-tuple as argument
35 | expected closure that takes 2 distinct arguments
36 help: change the closure to take multiple arguments instead of a single tuple
38 LL | [1, 2, 3].sort_by(|tuple, tuple2| panic!());
41 error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments
42 --> $DIR/closure-arg-count.rs:23:5
45 | ^ -- takes 0 arguments
47 | expected closure that takes 1 argument
50 --> $DIR/closure-arg-count.rs:13:1
52 LL | fn f<F: Fn<usize>>(_: F) {}
53 | ^^^^^^^^^^^^^^^^^^^^^^^^
55 error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
56 --> $DIR/closure-arg-count.rs:26:53
58 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x| i);
59 | ^^^ ------ takes 2 distinct arguments
61 | expected closure that takes a single 2-tuple as argument
62 help: change the closure to accept a tuple instead of individual arguments
64 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|(i, x)| i);
67 error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
68 --> $DIR/closure-arg-count.rs:28:53
70 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i: usize, x| i);
71 | ^^^ ------------- takes 2 distinct arguments
73 | expected closure that takes a single 2-tuple as argument
74 help: change the closure to accept a tuple instead of individual arguments
76 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|(i, x)| i);
79 error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 3 distinct arguments
80 --> $DIR/closure-arg-count.rs:30:53
82 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x, y| i);
83 | ^^^ --------- takes 3 distinct arguments
85 | expected closure that takes a single 2-tuple as argument
87 error[E0593]: function is expected to take a single 2-tuple as argument, but it takes 0 arguments
88 --> $DIR/closure-arg-count.rs:32:53
90 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(foo);
91 | ^^^ expected function that takes a single 2-tuple as argument
94 | -------- takes 0 arguments
96 error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 3 distinct arguments
97 --> $DIR/closure-arg-count.rs:35:53
99 LL | let bar = |i, x, y| i;
100 | --------- takes 3 distinct arguments
101 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(bar);
102 | ^^^ expected closure that takes a single 2-tuple as argument
104 error[E0593]: function is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
105 --> $DIR/closure-arg-count.rs:37:53
107 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(qux);
108 | ^^^ expected function that takes a single 2-tuple as argument
110 LL | fn qux(x: usize, y: usize) {}
111 | -------------------------- takes 2 distinct arguments
113 error[E0593]: function is expected to take 1 argument, but it takes 2 arguments
114 --> $DIR/closure-arg-count.rs:40:41
116 LL | let _it = vec![1, 2, 3].into_iter().map(usize::checked_add);
117 | ^^^ expected function that takes 1 argument
119 error[E0593]: function is expected to take 0 arguments, but it takes 1 argument
120 --> $DIR/closure-arg-count.rs:43:5
123 | ^^^^ expected function that takes 0 arguments
126 | --------------- takes 1 argument
128 note: required by `call`
129 --> $DIR/closure-arg-count.rs:50:1
131 LL | fn call<F, R>(_: F) where F: FnOnce() -> R {}
132 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
134 error: aborting due to 13 previous errors
136 For more information about this error, try `rustc --explain E0593`.