]> git.lizzy.rs Git - rust.git/blob - src/test/ui/chalkify/trait-objects.stderr
Auto merge of #101990 - clubby789:dont-machine-apply-placeholder-method, r=compiler...
[rust.git] / src / test / ui / chalkify / trait-objects.stderr
1 error: the type `&dyn Fn(i32) -> _` is not well-formed (chalk)
2   --> $DIR/trait-objects.rs:11:12
3    |
4 LL |     let f: &dyn Fn(i32) -> _ = &|x| x + x;
5    |            ^^^^^^^^^^^^^^^^^
6
7 error[E0277]: `(i32,)` is not a tuple
8   --> $DIR/trait-objects.rs:12:5
9    |
10 LL |     f(2);
11    |     ^^^^ the trait `Tuple` is not implemented for `(i32,)`
12    |
13 help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
14    |
15 LL | fn main() where (i32,): Tuple {
16    |           +++++++++++++++++++
17
18 error[E0277]: expected a `Fn<(i32,)>` closure, found `dyn Fn(i32) -> i32`
19   --> $DIR/trait-objects.rs:12:5
20    |
21 LL |     f(2);
22    |     ^^^^ expected an `Fn<(i32,)>` closure, found `dyn Fn(i32) -> i32`
23    |
24    = help: the trait `Fn<(i32,)>` is not implemented for `dyn Fn(i32) -> i32`
25
26 error: aborting due to 3 previous errors
27
28 For more information about this error, try `rustc --explain E0277`.