diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-11-12 08:07:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-12 08:07:18 +0100 |
| commit | ea61714d524c81400b979d32955dcac8c8241562 (patch) | |
| tree | 7f0b5a9d9afb314a122a7599f759f1a090f90404 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp | |
| parent | 87d5faf5b6a06559a3ea3aecc57f23113020a397 (diff) | |
| parent | bea0148ac62758a99dcc2ac2cc2efedacb8881bf (diff) | |
| download | rust-ea61714d524c81400b979d32955dcac8c8241562.tar.gz rust-ea61714d524c81400b979d32955dcac8c8241562.zip | |
Rollup merge of #132927 - BoxyUwU:consolidate_type_system_const_eval, r=compiler-errors
Consolidate type system const evaluation under `traits::evaluate_const`
Part of #130704
Fixes #128232
Fixes #118545
Removes `ty::Const::{normalize_internal, eval_valtree}` and `InferCtxt::(try_)const_eval_resolve`, consolidating the associated logic into `evaluate_const` in `rustc_trait_selection`. This results in an API for `ty::Const` that is free of any normalization/evaluation functions that would be incorrect to use under `min_generic_const_args`/`associated_const_equality`/`generic_const_exprs` or, more generally, that would be incorrect to use in the presence of generic type system constants.
Moving this logic to `rustc_trait_selection` and out of `rustc_middle` is also a pre-requisite for ensuring that we do not evaluate constants whose where clauses do not hold.
From this point it should be relatively simple (hah) to implement more complex normalization of type system constants such as: checking wf'ness before invoking CTFE machinery, or being able to normalize const aliases that still refer to generic parameters.
r? `@compiler-errors`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
