rust/compiler/rustc_middle/src/ty
Matthias Krüger 7e0118cdd2
Rollup merge of #136430 - FedericoBruzzone:follow-up-136180, r=oli-obk
Use the type-level constant value `ty::Value` where needed

**Follow-up to #136180**

### Summary

This PR refactors functions to accept a single type-level constant value `ty::Value` instead of separate `ty::ValTree` and `ty::Ty` parameters:

- `valtree_to_const_value`: now takes `ty::Value`
- `pretty_print_const_valtree`: now takes `ty::Value`
- Uses `pretty_print_const_valtree` for formatting valtrees  when `visit_const_operand`
- Moves `try_to_raw_bytes` from `ty::Valtree` to `ty::Value`

---

r? ``@lukas-code`` ``@oli-obk``
2025-02-03 21:11:35 +01:00
..
consts Move try_to_raw_bytes from ty::Valtree to ty::Value 2025-02-03 18:33:27 +01:00
context Delete the cfg(not(parallel)) serial compiler 2024-11-12 13:38:58 +00:00
inhabitedness use TypingEnv when no infcx is available 2024-11-18 10:38:56 +01:00
print Rollup merge of #136430 - FedericoBruzzone:follow-up-136180, r=oli-obk 2025-02-03 21:11:35 +01:00
abstract_const.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
adjustment.rs Register const preds for Deref adjustments in HIR typeck 2024-11-04 04:51:31 +00:00
adt.rs Convert some Into impls into From impls 2024-12-31 01:56:33 +00:00
assoc.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
cast.rs unify dyn* coercions with other pointer coercions 2024-09-24 22:17:55 +02:00
closure.rs Run clippy --fix for unnecessary_map_or lint 2025-01-19 19:15:00 +00:00
codec.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
consts.rs add comments 2025-01-30 18:13:16 +01:00
context.rs Rename tcx.ensure() to tcx.ensure_ok() 2025-02-01 12:38:54 +11:00
diagnostics.rs Make comma separated lists of anything easier to make for errors 2025-01-31 20:36:44 +00:00
elaborate_impl.rs Uplift elaboration 2024-07-07 11:28:01 -04:00
erase_regions.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
error.rs Rework "long type names" printing logic 2025-01-31 20:39:01 +00:00
fast_reject.rs Use DeepRejectCtxt to quickly reject ParamEnv candidates 2024-09-02 19:59:18 +03:00
flags.rs introduce ty::Value 2025-01-30 17:47:44 +01:00
fold.rs introduce LateParamRegionKind 2024-12-18 16:05:44 +01:00
generic_args.rs Delete the cfg(not(parallel)) serial compiler 2024-11-12 13:38:58 +00:00
generics.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
impls_ty.rs const-eval interning: accpt interior mutable pointers in final value (but keep rejecting mutable references) 2024-09-10 10:26:16 +02:00
instance.rs Run clippy --fix for unnecessary_map_or lint 2025-01-19 19:15:00 +00:00
intrinsic.rs add new rustc_const_stable_intrinsic attribute for const-stable intrinsics 2024-11-04 23:27:46 +01:00
layout.rs Auto merge of #135318 - compiler-errors:vtable-fixes, r=lcnr 2025-01-31 04:09:11 +00:00
list.rs De-abstract tagged pointer abstraction 2025-01-12 14:56:10 +00:00
mod.rs introduce ty::Value 2025-01-30 17:47:44 +01:00
normalize_erasing_regions.rs Account for identity substituted items in symbol mangling 2025-01-09 13:55:40 +01:00
opaque_types.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
parameterized.rs Target modifiers (special marked options) are recorded in metainfo and compared to be equal in different crates 2025-02-02 22:12:49 +07:00
pattern.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
predicate.rs Get rid of ToPolyTraitRef 2025-01-18 18:47:17 +00:00
region.rs introduce LateParamRegionKind 2024-12-18 16:05:44 +01:00
relate.rs Rollup merge of #133362 - compiler-errors:existential-preds, r=BoxyUwU 2024-11-26 12:03:43 -05:00
return_position_impl_trait_in_trait.rs Rollup merge of #135860 - fmease:compiler-mv-obj-save-dyn-compat-ii, r=jieyouxu 2025-01-31 12:28:15 +01:00
rvalue_scopes.rs Rename Scope.id to Scope.local_id, remove trivial accessor 2024-12-19 02:31:58 +00:00
structural_impls.rs Refactor using the type-level constant value ty::Value 2025-02-03 14:19:43 +01:00
sty.rs Run clippy --fix for unnecessary_map_or lint 2025-01-19 19:15:00 +00:00
trait_def.rs split up #[rustc_deny_explicit_impl] attribute 2024-12-20 16:57:14 +01:00
typeck_results.rs Clarify the match ergonomics 2024 migration lint's output 2024-12-17 13:38:21 -08:00
util.rs Rename tcx.ensure() to tcx.ensure_ok() 2025-02-01 12:38:54 +11:00
visit.rs Handle rustc-hir-analysis cases of rustc::potential_query_instability lint 2024-10-02 08:28:45 +03:00
vtable.rs Do not treat vtable supertraits as distinct when bound with different bound vars 2025-01-30 15:33:58 +00:00
walk.rs introduce ty::Value 2025-01-30 17:47:44 +01:00