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