-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Tracking issue for removing unnecessary ty::Const::{normalize,eval}
calls from the type system
#130704
Comments
Are they? The role of |
As a meta remark here, I think @rust-lang/wg-const-eval should generally be kept in the loop when t-types is fundamentally changing the API of In particular, we did a bunch of work to make that API somewhat consistent with |
Nothing is fundamentally changing about being able to normalize type system constants, this has zero impact on const evaluation. This is a refactoring to make |
I didn't say any functionality was being removed. Just APIs are being (re)moved, for what I assume are good reasons. But surely wg-const-eval needs to understand why this is done. You can't say that the |
I am absolutely saying that in this case it has nothing to do with this group. Nothing has fundamentally changed with this refactoring, it has no impact on const eval whatsoever. This is primarily a focus about how the API should be structured for normalizing type system constants not any of the actual const eval logic. If we were introducing new constraints on how ctfe must work for const generics or what circumstances ctfe must be able to run in then sure wg-const-eval should be included. But this refactoring does not affect const eval/ctfe in any real way. |
Both of you may be interested in moving extended discussion into a Zulip topic :) |
We want to remove calls to
ty::Const::{normalize,eval,eval_to_*}
because they won't work correctly with future reformulations of GCE, and because they're unnecessary with non-GCE consts. This issue tracks doing that so I won't forget. Boxy can probably write more motivation here idkBoxy rationale:
eval_bits
withtry_to_bits
, which I forgot in codegen loleval
frommir_build
andpattern_analysis
in now that writeback results are normalized (Replace calls toty::Const::{try_}eval
in mir build/pattern analysis #130715)structurally_resolve_const
for use inFnCtxt
/hir_typeck
(Introducestructurally_normalize_const
, use it inrustc_hir_typeck
#130714)eval_*
withstructurally_resolve
+try_to_*
in hir typeckeva;/normalize
post-borrowck, replacing them with theirtry_to_*
variants + possibly normalizing depending on the source of the const.More:
ty::Const::normalize
in error reporting #130712cc @BoxyUwU
The text was updated successfully, but these errors were encountered: