summaryrefslogtreecommitdiffstats
path: root/tests/ui/higher-rank-trait-bounds/normalize-under-binder/issue-90950.rs
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-rank-trait-bounds/normalize-under-binder/issue-90950.rs
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-rank-trait-bounds/normalize-under-binder/issue-90950.rs')
-rw-r--r--tests/ui/higher-rank-trait-bounds/normalize-under-binder/issue-90950.rs53
1 files changed, 0 insertions, 53 deletions
diff --git a/tests/ui/higher-rank-trait-bounds/normalize-under-binder/issue-90950.rs b/tests/ui/higher-rank-trait-bounds/normalize-under-binder/issue-90950.rs
deleted file mode 100644
index ab9d9a7ce..000000000
--- a/tests/ui/higher-rank-trait-bounds/normalize-under-binder/issue-90950.rs
+++ /dev/null
@@ -1,53 +0,0 @@
-// check-fail
-// known-bug: #90950
-
-trait Yokeable<'a>: 'static {
- type Output: 'a;
-}
-
-
-trait IsCovariant<'a> {}
-
-struct Yoke<Y: for<'a> Yokeable<'a>> {
- data: Y,
-}
-
-
-// impl<Y: for<'a> Yokeable<'a>> Yoke<Y> {
-// fn project<Y2: for<'a> Yokeable<'a>>(
-// &self,
-// f: for<'a> fn(<Y as Yokeable<'a>>::Output, &'a (),
-// ) -> <Y2 as Yokeable<'a>>::Output) -> Yoke<Y2> {
-// unimplemented!()
-// }
-// }
-
-fn upcast<Y>(x: Yoke<Y>) -> Yoke<Box<dyn IsCovariant<'static> + 'static>> where
- Y: for<'a> Yokeable<'a>,
- for<'a> <Y as Yokeable<'a>>::Output: IsCovariant<'a>
- {
- // x.project(|data, _| {
- // Box::new(data)
- // })
- unimplemented!()
-}
-
-
-impl<'a> Yokeable<'a> for Box<dyn IsCovariant<'static> + 'static> {
- type Output = Box<dyn IsCovariant<'a> + 'a>;
-}
-
-// this impl is mostly an example and unnecessary for the pure repro
-use std::borrow::*;
-impl<'a, T: ToOwned + ?Sized> Yokeable<'a> for Cow<'static, T> {
- type Output = Cow<'a, T>;
-}
-impl<'a, T: ToOwned + ?Sized> IsCovariant<'a> for Cow<'a, T> {}
-
-
-
-fn upcast_yoke(y: Yoke<Cow<'static, str>>) -> Yoke<Box<dyn IsCovariant<'static> + 'static>> {
- upcast(y)
-}
-
-fn main() {}