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

ices/62529-13.rs: fixed with no errors #919

Closed
wants to merge 1 commit into from

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#62529

// Taken from #68578.

trait Trait { type Resources: Resources; }
impl Trait for () {
    type Resources = usize;
}


trait ResourceFamily<'a> { type Output; }

struct UsizeResourceFamily;
impl<'a> ResourceFamily<'a> for UsizeResourceFamily {
    type Output = &'a usize;
}

trait Resources { type Family: for<'a> ResourceFamily<'a>; }
impl Resources for usize {
    type Family = UsizeResourceFamily;
}

fn test<T: Trait>() {
    let _: Box<dyn Fn(&mut <<<T as Trait>::Resources as Resources>::Family as ResourceFamily>::Output)> = Box::new(|_| {});
}

fn main() {
    test::<()>();
}
=== stdout ===
=== stderr ===
==============

=== stdout ===
=== stderr ===
==============
@Alexendoo Alexendoo closed this Aug 26, 2021
@Alexendoo Alexendoo deleted the autofix/ices/62529-13.rs branch August 29, 2021 12:49
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