]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-60283.stderr
e74a34e247a6763e3381b031daaca69dd7854db2
[rust.git] / src / test / ui / issues / issue-60283.stderr
1 error[E0631]: type mismatch in function arguments
2   --> $DIR/issue-60283.rs:14:13
3    |
4 LL | pub fn foo<T, F>(_: T, _: F)
5    |        --- required by a bound in this
6 LL | where T: for<'a> Trait<'a>,
7 LL |       F: for<'a> FnMut(<T as Trait<'a>>::Item) {}
8    |          ------------------------------------- required by this bound in `foo`
9 ...
10 LL |     foo((), drop)
11    |             ^^^^
12    |             |
13    |             expected signature of `for<'a> fn(<() as Trait<'a>>::Item) -> _`
14    |             found signature of `fn(_) -> _`
15
16 error[E0271]: type mismatch resolving `for<'a> <fn(_) {std::mem::drop::<_>} as std::ops::FnOnce<(<() as Trait<'a>>::Item,)>>::Output == ()`
17   --> $DIR/issue-60283.rs:14:5
18    |
19 LL | pub fn foo<T, F>(_: T, _: F)
20    |        --- required by a bound in this
21 LL | where T: for<'a> Trait<'a>,
22 LL |       F: for<'a> FnMut(<T as Trait<'a>>::Item) {}
23    |                  ----------------------------- required by this bound in `foo`
24 ...
25 LL |     foo((), drop)
26    |     ^^^ expected bound lifetime parameter 'a, found concrete lifetime
27
28 error: aborting due to 2 previous errors
29
30 Some errors have detailed explanations: E0271, E0631.
31 For more information about an error, try `rustc --explain E0271`.