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

ices/89312.rs: fixed with no errors #1124

Merged
merged 1 commit into from
Feb 9, 2022
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Feb 9, 2022

Issue: rust-lang/rust#89312

#![feature(type_alias_impl_trait)]

trait T { type Item; }

type Alias<'a> = impl T<Item = &'a ()>;

struct S;
impl<'a> T for &'a S {
    type Item = &'a ();
}

fn filter_positive<'a>() -> Alias<'a> {
    &S
}

fn with_positive(fun: impl Fn(Alias<'_>)) {
    fun(filter_positive());
}

fn main() {
    with_positive(|_| ());
}
=== stdout ===
=== stderr ===
==============

=== stdout ===
=== stderr ===
==============
@Alexendoo Alexendoo merged commit 06c8426 into master Feb 9, 2022
@Alexendoo Alexendoo deleted the autofix/ices/89312.rs branch February 9, 2022 12:54
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