-
Notifications
You must be signed in to change notification settings - Fork 14k
Fix query cycle when encounter unevaluated const #148698
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
base: main
Are you sure you want to change the base?
Conversation
|
I didn't do this for the |
|
r? @BoxyUwU |
|
|
|
|
||
| // Since there is no generic parameter, we can just drop the environment | ||
| // to prevent query cycle. | ||
| if !uv.args.has_non_region_param() { |
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 you should be able to do this unconditionally because we early exit above if there are any generic parameters. can can you try always using the empty env. should also be able to get rid of the previous assignment to typing_env this way too
Fixes rust-lang/trait-system-refactor-initiative#249
In this PR, the environment is dropped when evaluating const that does not have any generic parameter to fix the query cycle.