@@ -45,41 +45,33 @@ help: change the closure to take multiple arguments instead of a single tuple
4545LL | [1, 2, 3].sort_by(|tuple, tuple2| panic!());
4646 | ~~~~~~~~~~~~~~~
4747
48- error[E0593 ]: closure is expected to take 1 argument, but it takes 0 arguments
48+ error[E0308 ]: mismatched types
4949 --> $DIR/closure-arg-count.rs:13:5
5050 |
5151LL | f(|| panic!());
52- | ^ -- takes 0 arguments
53- | |
54- | expected closure that takes 1 argument
52+ | ^ types differ
5553 |
54+ = note: expected trait `Fn<usize>`
55+ found trait `Fn<()>`
5656note: required by a bound in `f`
5757 --> $DIR/closure-arg-count.rs:3:9
5858 |
5959LL | fn f<F: Fn<usize>>(_: F) {}
6060 | ^^^^^^^^^ required by this bound in `f`
61- help: consider changing the closure to take and ignore the expected argument
62- |
63- LL | f(|_| panic!());
64- | ~~~
6561
66- error[E0593 ]: closure is expected to take 1 argument, but it takes 0 arguments
62+ error[E0308 ]: mismatched types
6763 --> $DIR/closure-arg-count.rs:15:5
6864 |
6965LL | f( move || panic!());
70- | ^ ---------- takes 0 arguments
71- | |
72- | expected closure that takes 1 argument
66+ | ^ types differ
7367 |
68+ = note: expected trait `Fn<usize>`
69+ found trait `Fn<()>`
7470note: required by a bound in `f`
7571 --> $DIR/closure-arg-count.rs:3:9
7672 |
7773LL | fn f<F: Fn<usize>>(_: F) {}
7874 | ^^^^^^^^^ required by this bound in `f`
79- help: consider changing the closure to take and ignore the expected argument
80- |
81- LL | f( move |_| panic!());
82- | ~~~
8375
8476error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
8577 --> $DIR/closure-arg-count.rs:18:53
@@ -198,4 +190,5 @@ LL | fn call<F, R>(_: F) where F: FnOnce() -> R {}
198190
199191error: aborting due to 14 previous errors
200192
201- For more information about this error, try `rustc --explain E0593`.
193+ Some errors have detailed explanations: E0308, E0593.
194+ For more information about an error, try `rustc --explain E0308`.
0 commit comments