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
51 LL | fn f<F: Fn<usize>>(_: F) {}
52 | --------- required by this bound in `f`
55 | ^ -- takes 0 arguments
57 | expected closure that takes 1 argument
59 help: consider changing the closure to take and ignore the expected argument
64 error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments
65 --> $DIR/closure-arg-count.rs:15:5
67 LL | fn f<F: Fn<usize>>(_: F) {}
68 | --------- required by this bound in `f`
70 LL | f( move || panic!());
71 | ^ ---------- takes 0 arguments
73 | expected closure that takes 1 argument
75 help: consider changing the closure to take and ignore the expected argument
77 LL | f( move |_| panic!());
80 error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
81 --> $DIR/closure-arg-count.rs:18:53
83 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x| i);
84 | ^^^ ------ takes 2 distinct arguments
86 | expected closure that takes a single 2-tuple as argument
88 help: change the closure to accept a tuple instead of individual arguments
90 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|(i, x)| i);
93 error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
94 --> $DIR/closure-arg-count.rs:20:53
96 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i: usize, x| i);
97 | ^^^ ------------- takes 2 distinct arguments
99 | expected closure that takes a single 2-tuple as argument
101 help: change the closure to accept a tuple instead of individual arguments
103 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|(i, x)| i);
106 error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 3 distinct arguments
107 --> $DIR/closure-arg-count.rs:22:53
109 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x, y| i);
110 | ^^^ --------- takes 3 distinct arguments
112 | expected closure that takes a single 2-tuple as argument
114 error[E0593]: function is expected to take a single 2-tuple as argument, but it takes 0 arguments
115 --> $DIR/closure-arg-count.rs:24:57
117 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(foo);
118 | ^^^ expected function that takes a single 2-tuple as argument
121 | -------- takes 0 arguments
123 error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 3 distinct arguments
124 --> $DIR/closure-arg-count.rs:27:57
126 LL | let bar = |i, x, y| i;
127 | --------- takes 3 distinct arguments
128 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(bar);
129 | ^^^ expected closure that takes a single 2-tuple as argument
131 error[E0593]: function is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
132 --> $DIR/closure-arg-count.rs:29:57
134 LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(qux);
135 | ^^^ expected function that takes a single 2-tuple as argument
137 LL | fn qux(x: usize, y: usize) {}
138 | -------------------------- takes 2 distinct arguments
140 error[E0593]: function is expected to take 1 argument, but it takes 2 arguments
141 --> $DIR/closure-arg-count.rs:32:45
143 LL | let _it = vec![1, 2, 3].into_iter().map(usize::checked_add);
144 | ^^^^^^^^^^^^^^^^^^ expected function that takes 1 argument
146 error[E0593]: function is expected to take 0 arguments, but it takes 1 argument
147 --> $DIR/closure-arg-count.rs:35:10
150 | ^^^ expected function that takes 0 arguments
152 LL | fn call<F, R>(_: F) where F: FnOnce() -> R {}
153 | ------------- required by this bound in `call`
155 | --------------- takes 1 argument
157 error: aborting due to 14 previous errors
159 For more information about this error, try `rustc --explain E0593`.