-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Replace ParamEnv
with a new type in chalk context.
#55040
Conversation
@@ -97,24 +99,24 @@ impl context::Context for ChalkArenas<'tcx> { | |||
|
|||
type Parameter = Kind<'tcx>; | |||
|
|||
type ProgramClause = ProgramClause<'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.
Why doesn’t the terminology line up here anymore with chalk?
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.
Mmh at some point the terminology diverged, we use Clause
in rustc for ProgramClause
in chalk, and ProgramClause
in rustc for ProgramClauseImplication
in chalk. I agree we should somehow resolve that conflict.
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 think the meaning of these words I would like to be using:
- "clause" is one of the "base facts" we know to be true
- in particular, this includes clauses injected via hypothesis, e.g. the clause
A
inA => G
.
- in particular, this includes clauses injected via hypothesis, e.g. the clause
- "program clause" is something that was given in the "input program"
- in our case, this means the stuff we created by lowering impls and so forth
In particular, program clauses are available globally at all times, whereas clauses may only be available to some goals.
let ty::InstantiatedPredicates { predicates } = | ||
tcx.predicates_of(def_id).instantiate_identity(tcx); | ||
|
||
let clauses = predicates.into_iter() |
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 love how clean this is.
☔ The latest upstream changes (presumably #54858) made this pull request unmergeable. Please resolve the merge conflicts. |
r=me once rebased |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@bors r=nikomatsakis |
📌 Commit 0684ead65930bd8b24f0e9779e0db3d35d17760b has been approved by |
☔ The latest upstream changes (presumably #55093) made this pull request unmergeable. Please resolve the merge conflicts. |
@bors r=nikomatsakis |
📌 Commit 55ce7a2 has been approved by |
Replace `ParamEnv` with a new type in chalk context. I left a few FIXMEs. r? @nikomatsakis
☀️ Test successful - status-appveyor, status-travis |
I left a few FIXMEs.
r? @nikomatsakis