summaryrefslogtreecommitdiffstats
path: root/tests/ui/higher-ranked/trait-bounds/issue-62203-hrtb-ice.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
commitdc0db358abe19481e475e10c32149b53370f1a1c (patch)
treeab8ce99c4b255ce46f99ef402c27916055b899ee /tests/ui/higher-ranked/trait-bounds/issue-62203-hrtb-ice.stderr
parentReleasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff)
downloadrustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz
rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/higher-ranked/trait-bounds/issue-62203-hrtb-ice.stderr')
-rw-r--r--tests/ui/higher-ranked/trait-bounds/issue-62203-hrtb-ice.stderr66
1 files changed, 66 insertions, 0 deletions
diff --git a/tests/ui/higher-ranked/trait-bounds/issue-62203-hrtb-ice.stderr b/tests/ui/higher-ranked/trait-bounds/issue-62203-hrtb-ice.stderr
new file mode 100644
index 000000000..4d470ae70
--- /dev/null
+++ b/tests/ui/higher-ranked/trait-bounds/issue-62203-hrtb-ice.stderr
@@ -0,0 +1,66 @@
+error[E0271]: type mismatch resolving `<L<[closure@issue-62203-hrtb-ice.rs:42:16]> as T0<'r, (&u8,)>>::O == <_ as Ty<'r>>::V`
+ --> $DIR/issue-62203-hrtb-ice.rs:39:9
+ |
+LL | let v = Unit2.m(
+ | - required by a bound introduced by this call
+LL | / L {
+LL | |
+LL | |
+LL | | f: |x| {
+... |
+LL | | },
+LL | | },
+ | |_________^ type mismatch resolving `<L<[closure@issue-62203-hrtb-ice.rs:42:16]> as T0<'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 associated function
+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]: expected `[closure@issue-62203-hrtb-ice.rs:42:16]` to be a closure that returns `Unit3`, but it returns `Unit4`
+ --> $DIR/issue-62203-hrtb-ice.rs:39:9
+ |
+LL | let v = Unit2.m(
+ | - required by a bound introduced by this call
+LL | / L {
+LL | |
+LL | |
+LL | | f: |x| {
+... |
+LL | | },
+LL | | },
+ | |_________^ expected `Unit3`, found `Unit4`
+ |
+note: required for `L<[closure@$DIR/issue-62203-hrtb-ice.rs:42:16: 42:19]>` to implement `for<'r> T0<'r, (&'r u8,)>`
+ --> $DIR/issue-62203-hrtb-ice.rs:17:16
+ |
+LL | impl<'a, A, T> T0<'a, A> for L<T>
+ | ^^^^^^^^^ ^^^^
+LL | where
+LL | T: FnMut(A) -> Unit3,
+ | ----- unsatisfied trait bound introduced here
+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 associated function
+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`.