compiler-team icon indicating copy to clipboard operation
compiler-team copied to clipboard

Split `Predicate` into `Goal` and `Clause`

Open oli-obk opened this issue 1 year ago • 2 comments

Proposal

Chalk and a-mir-formality have the concept of Goal and Clause that wrap certain subsets of what currently is Predicate to differentiate between things that need to be proven (e.g. when invoking x + y, a goal typeof(x): Add<typeof(y)> is introduced) and things that we know must hold (where clauses and implied bounds, essentially the ParamEnv).

Doing this will remove differences between rustc trait solving and chalk, and paves the way for properly checking higher kinded lifetime bounds (it would be possible without this, but it's annoying and not making the code more readable).

Mentors or Reviewers

  • @nikomatsakis and @lcnr

Process

The main points of the Major Change Process are as follows:

  • [x] File an issue describing the proposal.
  • [ ] A compiler team member or contributor who is knowledgeable in the area can second by writing @rustbot second.
    • Finding a "second" suffices for internal changes. If however, you are proposing a new public-facing feature, such as a -C flag, then full team check-off is required.
    • Compiler team members can initiate a check-off via @rfcbot fcp merge on either the MCP or the PR.
  • [ ] Once an MCP is seconded, the Final Comment Period begins. If no objections are raised after 10 days, the MCP is considered approved.

You can read more about Major Change Proposals on forge.

Comments

This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

oli-obk avatar Jul 20 '22 08:07 oli-obk

This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

cc @rust-lang/compiler @rust-lang/compiler-contributors

rustbot avatar Jul 20 '22 08:07 rustbot

@rustbot second

lcnr avatar Jul 20 '22 10:07 lcnr

@rustbot label -final-comment-period +major-change-accepted

apiraino avatar Aug 03 '22 15:08 apiraino