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 note: required by a bound in `map`
130 --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
132 LL | F: FnMut(Self::Item) -> B,
133 | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map`
135 error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 3 distinct arguments
136 --> $DIR/closure-arg-count.rs:27:57
138 LL | let bar = |i, x, y| i;
139 | --------- takes 3 distinct arguments
140 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(bar);
141 | --- ^^^ expected closure that takes a single 2-tuple as argument
143 | required by a bound introduced by this call
145 note: required by a bound in `map`
146 --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
148 LL | F: FnMut(Self::Item) -> B,
149 | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map`
151 error[E0593]: function is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
152 --> $DIR/closure-arg-count.rs:29:57
154 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(qux);
155 | --- ^^^ expected function that takes a single 2-tuple as argument
157 | required by a bound introduced by this call
159 LL | fn qux(x: usize, y: usize) {}
160 | -------------------------- takes 2 distinct arguments
162 note: required by a bound in `map`
163 --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
165 LL | F: FnMut(Self::Item) -> B,
166 | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map`
168 error[E0593]: function is expected to take 1 argument, but it takes 2 arguments
169 --> $DIR/closure-arg-count.rs:32:45
171 LL | let _it = vec![1, 2, 3].into_iter().map(usize::checked_add);
172 | --- ^^^^^^^^^^^^^^^^^^ expected function that takes 1 argument
174 | required by a bound introduced by this call
176 note: required by a bound in `map`
177 --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
179 LL | F: FnMut(Self::Item) -> B,
180 | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map`
182 error[E0593]: function is expected to take 0 arguments, but it takes 1 argument
183 --> $DIR/closure-arg-count.rs:35:10
186 | ---- ^^^ expected function that takes 0 arguments
188 | required by a bound introduced by this call
191 | --------------- takes 1 argument
193 note: required by a bound in `call`
194 --> $DIR/closure-arg-count.rs:42:30
196 LL | fn call<F, R>(_: F) where F: FnOnce() -> R {}
197 | ^^^^^^^^^^^^^ required by this bound in `call`
199 error: aborting due to 14 previous errors
201 For more information about this error, try `rustc --explain E0593`.