diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-12-02 23:08:54 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-02 23:08:54 +0100 |
| commit | 6f0d15a144f2d1ee01a3991e1c8f84d411902735 (patch) | |
| tree | 16253e2e78857a02845700c7de42fafeb5f929d6 /compiler/rustc_mir_transform/src/coverage/query.rs | |
| parent | f79e09c562098203a65e98e03d99a90009020cc2 (diff) | |
| parent | dcf332bd9ddd6c81c54ce6422243df9a96cef44f (diff) | |
| download | rust-6f0d15a144f2d1ee01a3991e1c8f84d411902735.tar.gz rust-6f0d15a144f2d1ee01a3991e1c8f84d411902735.zip | |
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`
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/query.rs')
0 files changed, 0 insertions, 0 deletions
