Conversation
|
rustbot has assigned @dingxiangfei2009. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
cc @Zalathar |
| let is_all_def_kind = |def_kind| { | ||
| stack.iter().all(|entry| match entry.node.tagged_key { | ||
| TaggedQueryKey::type_of(def_id) | ||
| | TaggedQueryKey::explicit_implied_predicates_of(def_id) |
There was a problem hiding this comment.
Why does this condition contain the type_of and explicit_implied_predicates_of queries specifically?
The previous logic didn't contain any specific queries.
There was a problem hiding this comment.
These are the queries which are involved in simple TyAlias / TraitAlias cycles (in our tests at least).
There was a problem hiding this comment.
This needs a comment and probably a panic if we reach this code with any other TaggedQueryKey.
There was a problem hiding this comment.
It looks like the surrounding function is called to produce a diagnostic for any query cycle, and this particular snippet is doing a best-effort check for certain situations that would let us add more specific information to that diagnostic.
So a panic here seems inappropriate.
|
☔ The latest upstream changes (presumably #154032) made this pull request unmergeable. Please resolve the merge conflicts. |
This removes
TaggedQueryKey::def_kindby accessing the relevant query keys directly.