Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for quantified bounds on GATs #145

Merged
merged 2 commits into from
Jun 19, 2018

Conversation

scalexm
Copy link
Member

@scalexm scalexm commented Jun 3, 2018

Closes #116 modulo #144.

struct fn<T, U> { }

trait Bar {
type Item<T>: forall<U> Fn<T, U>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get a test where the bound would've worked, but for the higher-ranked nature of it? I am thinking of something like:

struct foo;
impl Fn<i32, i32> for foo { }

impl Bar for i32 {
  type Item<T> = foo;
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nikomatsakis I forgot to add an impl<T, U> Fn<T, U> for fn<T, U> { } in that test, I think the (now) corrected test is what you want

@scalexm scalexm force-pushed the quantified-inline-bound branch from bc8b18f to ddaafd3 Compare June 18, 2018 20:47
@nikomatsakis nikomatsakis merged commit 3a3c439 into rust-lang:master Jun 19, 2018
@scalexm scalexm deleted the quantified-inline-bound branch November 29, 2018 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants