1 error[E0593]: closure is expected to take 2 arguments, but it takes 0 arguments
2 --> $DIR/closure-arg-count.rs:15:15
4 15 | [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 17 | [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 19 | [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 19 | [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 21 | [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 21 | [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 13 | 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 26 | 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 26 | 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 28 | 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 28 | 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 30 | 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 32 | 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 34 | let bar = |i, x, y| i;
100 | --------- takes 3 distinct arguments
101 35 | 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 37 | let _it = vec![1, 2, 3].into_iter().enumerate().map(qux);
108 | ^^^ expected function that takes a single 2-tuple as argument
110 42 | fn qux(x: usize, y: usize) {}
111 | -------------------------- takes 2 distinct arguments
113 error: aborting due to 11 previous errors