Add sanity checking for query keys #68480
Labels
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
We frequently see issues where a query parameter ends up containing something that it's not supposed to (an inference variable, a placeholder region, etc): #68477 and #64964 are recent examples.
Currently, incremental compilation must be enabled to see these crashes, since they only occur when we try to hash the 'bad' type. This presents a number of issues:
rustc
directly (e.g. theui
test suite), since-C incremental=1
is usually not passed.I think it would be useful to add a
sanity_check
method toKey
, which would verify that the value is sane (e.g. no inference variances or placeholder regions) regardless of whether or not incremental compilation is enabled.The text was updated successfully, but these errors were encountered: