]> git.lizzy.rs Git - rust.git/blob - tests/ui/higher-rank-trait-bounds/issue-62203-hrtb-ice.stderr
Rollup merge of #106797 - FawazTirmizi:dev/issues/104284, r=bjorn3
[rust.git] / tests / ui / higher-rank-trait-bounds / issue-62203-hrtb-ice.stderr
1 error[E0271]: type mismatch resolving `for<'r> <L<[closure@issue-62203-hrtb-ice.rs:42:16]> as T0<'r, (&'r u8,)>>::O == <_ as Ty<'r>>::V`
2   --> $DIR/issue-62203-hrtb-ice.rs:39:9
3    |
4 LL |       let v = Unit2.m(
5    |                     - required by a bound introduced by this call
6 LL | /         L {
7 LL | |
8 LL | |
9 LL | |             f: |x| {
10 ...  |
11 LL | |             },
12 LL | |         },
13    | |_________^ type mismatch resolving `for<'r> <L<[closure@issue-62203-hrtb-ice.rs:42:16]> as T0<'r, (&'r u8,)>>::O == <_ as Ty<'r>>::V`
14    |
15 note: expected this to be `<_ as Ty<'_>>::V`
16   --> $DIR/issue-62203-hrtb-ice.rs:21:14
17    |
18 LL |     type O = T::Output;
19    |              ^^^^^^^^^
20    = note: expected associated type `<_ as Ty<'_>>::V`
21                        found struct `Unit4`
22    = help: consider constraining the associated type `<_ as Ty<'_>>::V` to `Unit4` or calling a method that returns `<_ as Ty<'_>>::V`
23    = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
24 note: required by a bound in `T1::m`
25   --> $DIR/issue-62203-hrtb-ice.rs:27:51
26    |
27 LL |     fn m<'a, B: Ty<'a>, F>(&self, f: F) -> Unit1
28    |        - required by a bound in this
29 LL |     where
30 LL |         F: for<'r> T0<'r, (<Self as Ty<'r>>::V,), O = <B as Ty<'r>>::V>,
31    |                                                   ^^^^^^^^^^^^^^^^^^^^ required by this bound in `T1::m`
32
33 error[E0271]: expected `[closure@issue-62203-hrtb-ice.rs:42:16]` to be a closure that returns `Unit3`, but it returns `Unit4`
34   --> $DIR/issue-62203-hrtb-ice.rs:39:9
35    |
36 LL |       let v = Unit2.m(
37    |                     - required by a bound introduced by this call
38 LL | /         L {
39 LL | |
40 LL | |
41 LL | |             f: |x| {
42 ...  |
43 LL | |             },
44 LL | |         },
45    | |_________^ expected struct `Unit3`, found struct `Unit4`
46    |
47 note: required for `L<[closure@$DIR/issue-62203-hrtb-ice.rs:42:16: 42:19]>` to implement `for<'r> T0<'r, (&'r u8,)>`
48   --> $DIR/issue-62203-hrtb-ice.rs:17:16
49    |
50 LL | impl<'a, A, T> T0<'a, A> for L<T>
51    |                ^^^^^^^^^     ^^^^
52 LL | where
53 LL |     T: FnMut(A) -> Unit3,
54    |                    ----- unsatisfied trait bound introduced here
55 note: required by a bound in `T1::m`
56   --> $DIR/issue-62203-hrtb-ice.rs:27:12
57    |
58 LL |     fn m<'a, B: Ty<'a>, F>(&self, f: F) -> Unit1
59    |        - required by a bound in this
60 LL |     where
61 LL |         F: for<'r> T0<'r, (<Self as Ty<'r>>::V,), O = <B as Ty<'r>>::V>,
62    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `T1::m`
63
64 error: aborting due to 2 previous errors
65
66 For more information about this error, try `rustc --explain E0271`.