1 error[E0593]: closure is expected to take 2 arguments, but it takes 0 arguments
2 --> $DIR/closure-arg-count.rs:5:15
4 LL | [1, 2, 3].sort_by(|| panic!());
5 | ^^^^^^^ -- takes 0 arguments
7 | expected closure that takes 2 arguments
9 help: consider changing the closure to take and ignore the expected arguments
11 LL | [1, 2, 3].sort_by(|_, _| panic!());
14 error[E0593]: closure is expected to take 2 arguments, but it takes 1 argument
15 --> $DIR/closure-arg-count.rs:7:15
17 LL | [1, 2, 3].sort_by(|tuple| panic!());
18 | ^^^^^^^ ------- takes 1 argument
20 | expected closure that takes 2 arguments
22 error[E0593]: closure is expected to take 2 distinct arguments, but it takes a single 2-tuple as argument
23 --> $DIR/closure-arg-count.rs:9:15
25 LL | [1, 2, 3].sort_by(|(tuple, tuple2)| panic!());
26 | ^^^^^^^ ----------------- takes a single 2-tuple as argument
28 | expected closure that takes 2 distinct arguments
30 help: change the closure to take multiple arguments instead of a single tuple
32 LL | [1, 2, 3].sort_by(|tuple, tuple2| panic!());
35 error[E0593]: closure is expected to take 2 distinct arguments, but it takes a single 2-tuple as argument
36 --> $DIR/closure-arg-count.rs:11:15
38 LL | [1, 2, 3].sort_by(|(tuple, tuple2): (usize, _)| panic!());
39 | ^^^^^^^ ----------------------------- takes a single 2-tuple as argument
41 | expected closure that takes 2 distinct arguments
43 help: change the closure to take multiple arguments instead of a single tuple
45 LL | [1, 2, 3].sort_by(|tuple, tuple2| panic!());
48 error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments
49 --> $DIR/closure-arg-count.rs:13:5
52 | ^ -- takes 0 arguments
54 | expected closure that takes 1 argument
56 note: required by a bound in `f`
57 --> $DIR/closure-arg-count.rs:3:9
59 LL | fn f<F: Fn<usize>>(_: F) {}
60 | ^^^^^^^^^ required by this bound in `f`
61 help: consider changing the closure to take and ignore the expected argument
66 error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments
67 --> $DIR/closure-arg-count.rs:15:5
69 LL | f( move || panic!());
70 | ^ ---------- takes 0 arguments
72 | expected closure that takes 1 argument
74 note: required by a bound in `f`
75 --> $DIR/closure-arg-count.rs:3:9
77 LL | fn f<F: Fn<usize>>(_: F) {}
78 | ^^^^^^^^^ required by this bound in `f`
79 help: consider changing the closure to take and ignore the expected argument
81 LL | f( move |_| panic!());
84 error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
85 --> $DIR/closure-arg-count.rs:18:53
87 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x| i);
88 | ^^^ ------ takes 2 distinct arguments
90 | expected closure that takes a single 2-tuple as argument
92 help: change the closure to accept a tuple instead of individual arguments
94 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|(i, x)| i);
97 error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
98 --> $DIR/closure-arg-count.rs:20:53
100 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i: usize, x| i);
101 | ^^^ ------------- takes 2 distinct arguments
103 | expected closure that takes a single 2-tuple as argument
105 help: change the closure to accept a tuple instead of individual arguments
107 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|(i, x)| i);
110 error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 3 distinct arguments
111 --> $DIR/closure-arg-count.rs:22:53
113 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x, y| i);
114 | ^^^ --------- takes 3 distinct arguments
116 | expected closure that takes a single 2-tuple as argument
118 error[E0593]: function is expected to take a single 2-tuple as argument, but it takes 0 arguments
119 --> $DIR/closure-arg-count.rs:24:57
121 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(foo);
122 | --- ^^^ expected function that takes a single 2-tuple as argument
124 | required by a bound introduced by this call
127 | -------- takes 0 arguments
129 error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 3 distinct arguments
130 --> $DIR/closure-arg-count.rs:27:57
132 LL | let bar = |i, x, y| i;
133 | --------- takes 3 distinct arguments
134 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(bar);
135 | --- ^^^ expected closure that takes a single 2-tuple as argument
137 | required by a bound introduced by this call
139 error[E0593]: function is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
140 --> $DIR/closure-arg-count.rs:29:57
142 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(qux);
143 | --- ^^^ expected function that takes a single 2-tuple as argument
145 | required by a bound introduced by this call
147 LL | fn qux(x: usize, y: usize) {}
148 | -------------------------- takes 2 distinct arguments
150 error[E0593]: function is expected to take 1 argument, but it takes 2 arguments
151 --> $DIR/closure-arg-count.rs:32:45
153 LL | let _it = vec![1, 2, 3].into_iter().map(usize::checked_add);
154 | --- ^^^^^^^^^^^^^^^^^^ expected function that takes 1 argument
156 | required by a bound introduced by this call
158 error[E0593]: function is expected to take 0 arguments, but it takes 1 argument
159 --> $DIR/closure-arg-count.rs:35:10
162 | ---- ^^^ expected function that takes 0 arguments
164 | required by a bound introduced by this call
167 | --------------- takes 1 argument
169 note: required by a bound in `call`
170 --> $DIR/closure-arg-count.rs:42:30
172 LL | fn call<F, R>(_: F) where F: FnOnce() -> R {}
173 | ^^^^^^^^^^^^^ required by this bound in `call`
175 error: aborting due to 14 previous errors
177 For more information about this error, try `rustc --explain E0593`.