summaryrefslogtreecommitdiffstats
path: root/src/test/ui/hrtb/issue-62203-hrtb-ice.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/hrtb/issue-62203-hrtb-ice.stderr')
-rw-r--r--src/test/ui/hrtb/issue-62203-hrtb-ice.stderr53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/test/ui/hrtb/issue-62203-hrtb-ice.stderr b/src/test/ui/hrtb/issue-62203-hrtb-ice.stderr
new file mode 100644
index 000000000..79ef56b9f
--- /dev/null
+++ b/src/test/ui/hrtb/issue-62203-hrtb-ice.stderr
@@ -0,0 +1,53 @@
+error[E0271]: type mismatch resolving `for<'r> <L<[closure@$DIR/issue-62203-hrtb-ice.rs:42:17: 42:20]> as T0<'r, (&'r u8,)>>::O == <_ as Ty<'r>>::V`
+ --> $DIR/issue-62203-hrtb-ice.rs:38:19
+ |
+LL | let v = Unit2.m(
+ | ^ type mismatch resolving `for<'r> <L<[closure@$DIR/issue-62203-hrtb-ice.rs:42:17: 42:20]> as T0<'r, (&'r u8,)>>::O == <_ as Ty<'r>>::V`
+ |
+note: expected this to be `<_ as Ty<'_>>::V`
+ --> $DIR/issue-62203-hrtb-ice.rs:21:14
+ |
+LL | type O = T::Output;
+ | ^^^^^^^^^
+ = note: expected associated type `<_ as Ty<'_>>::V`
+ found struct `Unit4`
+ = help: consider constraining the associated type `<_ as Ty<'_>>::V` to `Unit4` or calling a method that returns `<_ as Ty<'_>>::V`
+ = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
+note: required by a bound in `T1::m`
+ --> $DIR/issue-62203-hrtb-ice.rs:27:51
+ |
+LL | fn m<'a, B: Ty<'a>, F>(&self, f: F) -> Unit1
+ | - required by a bound in this
+LL | where
+LL | F: for<'r> T0<'r, (<Self as Ty<'r>>::V,), O = <B as Ty<'r>>::V>,
+ | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `T1::m`
+
+error[E0271]: type mismatch resolving `for<'r> <[closure@$DIR/issue-62203-hrtb-ice.rs:42:17: 42:20] as FnOnce<((&'r u8,),)>>::Output == Unit3`
+ --> $DIR/issue-62203-hrtb-ice.rs:40:9
+ |
+LL | let v = Unit2.m(
+ | - required by a bound introduced by this call
+LL |
+LL | / L {
+LL | |
+LL | | f : |x| { drop(x); Unit4 }
+LL | | });
+ | |_________^ expected struct `Unit3`, found struct `Unit4`
+ |
+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:17: 42:20]>`
+ --> $DIR/issue-62203-hrtb-ice.rs:17:16
+ |
+LL | impl<'a, A, T> T0<'a, A> for L<T>
+ | ^^^^^^^^^ ^^^^
+note: required by a bound in `T1::m`
+ --> $DIR/issue-62203-hrtb-ice.rs:27:12
+ |
+LL | fn m<'a, B: Ty<'a>, F>(&self, f: F) -> Unit1
+ | - required by a bound in this
+LL | where
+LL | F: for<'r> T0<'r, (<Self as Ty<'r>>::V,), O = <B as Ty<'r>>::V>,
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `T1::m`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0271`.