-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
[MCP] introduce ty::WhereClause to align chalk and rustc dyn repr #85466
Conversation
Some changes occured to the CTFE / Miri engine cc @rust-lang/miri |
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #85954) made this pull request unmergeable. Please resolve the merge conflicts. |
@nikomatsakis ping for a review🔔 |
@@ -716,11 +716,13 @@ pub enum ExistentialPredicate<'tcx> { | |||
AutoTrait(DefId), | |||
} | |||
|
|||
impl<'tcx> ExistentialPredicate<'tcx> { | |||
pub type ExistentialPredicate<'tcx> = Binder<'tcx, WhereClause<'tcx>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't quite right. The difference between rustc and Chalk isn't solely the name. In Chalk, there's actually two layers of Binders. One that contains a single type that represents See https://github.com/rust-lang/chalk/blob/802599ce2ca02f322c078f472e64c5cd3a208225/chalk-solve/src/rust_ir.rs#L233Self
, and one that represents the vars on the predicates itself.
edit: this isn't actually accurate; let me write up a better comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the big thing missing here is the removal of erase_self_ty
. And along with that, make the Self
ty actually be a bound var.
☔ The latest upstream changes (presumably #87424) made this pull request unmergeable. Please resolve the merge conflicts. |
ping from triage: |
@csmoe sorry this PR disappeared from my radar |
Are you still around? |
yep, time was tough. I'm back on this:) |
Augh! Let me give this a quick review @csmoe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, so, I read the PR. From what I can tell, before this PR:
- We have
Binder<ExistentialPredicate>
, whereExistentialPredicate
is a subset of predicates that don't haveSelf
position specified.
After this PR:
- We introduce
WhereClause
to be the oldExistentialPredicate
, and we makeExistentialPredicate
an alias forBinder<WC>
This seems good, but indeed only a first step in the ultimate direction. Ultimately we want to extend WhereClause
so it includes the Self
type, and @jackh726 is right that this will mean introducing another level of Binder.
I think we also want to share WhereClause with Predicate.
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #89619) made this pull request unmergeable. Please resolve the merge conflicts. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #90734) made this pull request unmergeable. Please resolve the merge conflicts. |
The job Click to see the possible cause of the failure (guessed by this bot)
|
☔ The latest upstream changes (presumably #91230) made this pull request unmergeable. Please resolve the merge conflicts. |
@csmoe Ping from triage: Any updates here? |
Closing this as inactive |
Closes rust-lang/types-team#30
Closes rust-lang/compiler-team#433
r? @nikomatsakis