Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

ices/112047.rs: fixed with errors #1682

Merged
merged 1 commit into from
Sep 21, 2023
Merged

ices/112047.rs: fixed with errors #1682

merged 1 commit into from
Sep 21, 2023

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#112047

#![feature(async_fn_in_trait)]

fn main() {
    let _ = async {
        A.first().await.second().await;
    };
}

pub trait First {
    type Second: Second;
    async fn first(self) -> Self::Second;
}

struct A;

impl First for A {
    type Second = A;
    async fn first(self) -> Self::Second {
        A
    }
}

pub trait Second {
    async fn second(self);
}

impl<C> Second for C
where
    C: First,
{
    async fn second(self) {
        self.first().await.second().await;
    }
}
=== stdout ===
=== stderr ===
error[E0275]: overflow evaluating the requirement `<A as Second>::{opaque#0} == _`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0275`.
==============

=== stdout ===
=== stderr ===
error[E0275]: overflow evaluating the requirement `<A as Second>::{opaque#0} == _`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0275`.
==============
@JohnTitor JohnTitor merged commit a4d6dc2 into master Sep 21, 2023
@JohnTitor JohnTitor deleted the autofix/ices/112047.rs branch September 21, 2023 18:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants