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

ices/88446.rs: fixed with no errors #968

Merged
merged 1 commit into from
Sep 13, 2021
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#88446

trait Yokeable<'a> {
    type Output: 'a;
}
impl<'a> Yokeable<'a> for () {
    type Output = ();
}

trait DataMarker<'data> {
    type Yokeable: for<'a> Yokeable<'a>;
}
impl<'data> DataMarker<'data> for () {
    type Yokeable = ();
}

struct DataPayload<'data, M>(&'data M);

impl DataPayload<'static, ()> {
    pub fn map_project_with_capture<M2, T>(
        _: for<'a> fn(
            capture: T,
            std::marker::PhantomData<&'a ()>,
        ) -> <M2::Yokeable as Yokeable<'a>>::Output,
    ) -> DataPayload<'static, M2>
    where
        M2: DataMarker<'static>,
    {
        todo!()
    }
}

fn main() {
    let _: DataPayload<()> = DataPayload::<()>::map_project_with_capture::<_, &()>(|_, _| todo!());
}
=== stdout ===
=== stderr ===
==============

=== stdout ===
=== stderr ===
==============
@Alexendoo Alexendoo merged commit 0eb21e9 into master Sep 13, 2021
@Alexendoo Alexendoo deleted the autofix/ices/88446.rs branch September 13, 2021 12:38
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