Add a QueryKeyId to identify a query instance#153492
Add a QueryKeyId to identify a query instance#153492Zoxc wants to merge 1 commit intorust-lang:mainfrom
QueryKeyId to identify a query instance#153492Conversation
|
r? @mati865 rustbot has assigned @mati865. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
If we can get rid of a lot of the QueryStackFrame complexity by just storing the query key in an enum, that seems great. The name |
Yeah, |
|
☔ The latest upstream changes (presumably #153316) made this pull request unmergeable. Please resolve the merge conflicts. |
|
This looks great! I hate the deferred/extra split, this seems like a really clean way to eliminate it. @Zoxc: can you expand the first paragraph of the PR description to explain (a) the current situation, and (b) how this PR changes that situation? I've skimmed the changes and they look good, but I will need to look again more closely on Monday to get my head fully around how the new cc @zetanumbers |
I was thinking of something like I think it's easier to say “this is a key that also indicates what query it came from” than to try to come up with an intuitive name for query+key. Or we could go for something like |
|
|
This adds back a
QueryKeyIdenum which represents a query kind and the associated key. This is used to replaceQueryStackDeferredandQueryStackFrameExtraand the associated lifting operation for cycle errorsThis approach has a couple of benefits:
QueryStackDeferredis removedSome further work could be replacing
QueryStackFramewithQueryKeyIdas the extra information can be derived from it.