summaryrefslogtreecommitdiffstats
path: root/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-80706.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-80706.rs
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-80706.rs')
-rw-r--r--src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-80706.rs71
1 files changed, 0 insertions, 71 deletions
diff --git a/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-80706.rs b/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-80706.rs
deleted file mode 100644
index 00a866f22..000000000
--- a/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-80706.rs
+++ /dev/null
@@ -1,71 +0,0 @@
-// build-pass
-// edition:2018
-
-type BoxFuture<T> = std::pin::Pin<Box<dyn std::future::Future<Output=T>>>;
-
-fn main() {
- f();
-}
-
-async fn f() {
- run("dependency").await;
-}
-
-struct InMemoryStorage;
-
-struct User<'dep> {
- dep: &'dep str,
-}
-
-impl<'a> StorageRequest<InMemoryStorage> for SaveUser<'a> {
- fn execute(&self) -> BoxFuture<Result<(), String>> {
- todo!()
- }
-}
-
-trait Storage {
- type Error;
-}
-
-impl Storage for InMemoryStorage {
- type Error = String;
-}
-
-trait StorageRequestReturnType {
- type Output;
-}
-
-trait StorageRequest<S: Storage>: StorageRequestReturnType {
- fn execute(
- &self,
- ) -> BoxFuture<Result<<Self as StorageRequestReturnType>::Output, <S as Storage>::Error>>;
-}
-
-struct SaveUser<'a> {
- name: &'a str,
-}
-
-impl<'a> StorageRequestReturnType for SaveUser<'a> {
- type Output = ();
-}
-
-impl<'dep> User<'dep> {
- async fn save<S>(self)
- where
- S: Storage,
- for<'a> SaveUser<'a>: StorageRequest<S>,
- {
- SaveUser { name: "Joe" }
- .execute()
- .await;
- }
-}
-
-async fn run<S>(dep: &str)
-where
- S: Storage,
- for<'a> SaveUser<'a>: StorageRequest<S>,
- for<'a> SaveUser<'a>: StorageRequestReturnType,
-{
- User { dep }.save().await;
-}