1
Fork 0
rust/compiler/rustc_hir_analysis
Guillaume Gomez 6f0d15a144
Rollup merge of #133610 - camelid:move-from_anon_const, r=BoxyUwU
Move `Const::{from_anon_const,try_from_lit}` to hir_ty_lowering

Fixes #128176.
This accomplishes one of the followup items from #131081.

These operations are much more about lowering the HIR than about
`Const`s themselves. They fit better in hir_ty_lowering with
`lower_const_arg` (formerly `Const::from_const_arg`) and the rest.

To accomplish this, `const_evaluatable_predicates_of` had to be changed
to not use `from_anon_const` anymore. Instead of visiting the HIR and
lowering anon consts on the fly, it now visits the `rustc_middle::ty`
data structures instead and directly looks for `UnevaluatedConst`s. This
approach was proposed in:
https://github.com/rust-lang/rust/pull/131081#discussion_r1821189257

r? `@BoxyUwU`
2024-12-02 23:08:54 +01:00
..
src Rollup merge of #133610 - camelid:move-from_anon_const, r=BoxyUwU 2024-12-02 23:08:54 +01:00
Cargo.toml Remove unused intercrate dependencies 2024-11-07 14:17:16 +00:00
messages.ftl Rollup merge of #116161 - Soveu:varargs2, r=cjgillot 2024-11-30 12:56:50 +08:00
README.md

For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.