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 chalk rules related to associated type defs #54909

Merged
merged 3 commits into from
Oct 11, 2018

Conversation

scalexm
Copy link
Member

@scalexm scalexm commented Oct 8, 2018

Fixes #50580.

As GATs are currently not implemented in rustc, we don't need the rule Implied-Bound-From-AssocTy for the moment. Indeed, this is basically:

trait Foo {
    type Assoc: Bound;
}

// forall<Self> { FromEnv(<Self as Foo>::Assoc: Bound) :- FromEnv(Self: Foo) }

but in the absence of GATs, the previous bound can be expressed as:

trait Foo where <Self as Foo>::Assoc: Bound { }

hence the above rule will come automatically with implied bounds from where clauses.

Similarly, the rule Implied-WC-From-AssocTy is not needed right now because associated types do not currently support where clauses.

r? @nikomatsakis

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 8, 2018
Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

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

r=me once rebased — actually @scalexm if you want, we could land this together with #54866 to save bors time (i.e., close #54866 and just land this)

@nikomatsakis nikomatsakis added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 9, 2018
@scalexm
Copy link
Member Author

scalexm commented Oct 9, 2018

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented Oct 9, 2018

📌 Commit 282559c has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 9, 2018
This was referenced Oct 10, 2018
Manishearth added a commit to Manishearth/rust that referenced this pull request Oct 10, 2018
bors added a commit that referenced this pull request Oct 11, 2018
Rollup of 9 pull requests

Successful merges:

 - #54747 (codegen_llvm: verify that inline assembly operands are scalars)
 - #54848 (Better Diagnostic for Trait Object Capture)
 - #54850 (Fix #54707 - parse_trait_item_ now handles interpolated blocks as function body decls)
 - #54858 (second round of refactorings for universes)
 - #54862 (Implement RFC 2539: cfg_attr with multiple attributes)
 - #54869 (Fix mobile docs)
 - #54870 (Stabilize tool lints)
 - #54893 (Fix internal compiler error on malformed match arm pattern.)
 - #54904 (Stabilize the `Option::replace` method)

Failed merges:

 - #54909 ( Add chalk rules related to associated type defs)

r? @ghost
bors added a commit that referenced this pull request Oct 11, 2018
Rollup of 9 pull requests

Successful merges:

 - #54747 (codegen_llvm: verify that inline assembly operands are scalars)
 - #54848 (Better Diagnostic for Trait Object Capture)
 - #54850 (Fix #54707 - parse_trait_item_ now handles interpolated blocks as function body decls)
 - #54858 (second round of refactorings for universes)
 - #54862 (Implement RFC 2539: cfg_attr with multiple attributes)
 - #54869 (Fix mobile docs)
 - #54870 (Stabilize tool lints)
 - #54893 (Fix internal compiler error on malformed match arm pattern.)
 - #54904 (Stabilize the `Option::replace` method)

Failed merges:

 - #54909 ( Add chalk rules related to associated type defs)

r? @ghost
@bors bors merged commit 282559c into rust-lang:master Oct 11, 2018
@scalexm scalexm deleted the finish-rules branch October 22, 2018 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants