rust/compiler/rustc_mir_transform/src
bors d9b4598d7e Auto merge of #135753 - compiler-errors:from-ty-const, r=oli-obk
Get rid of `mir::Const::from_ty_const`

This function is strange, because it turns valtrees into `mir::Const::Value`, but the rest of the const variants stay as type system consts.

All of the callsites except for one in `instsimplify` (array length simplification of `ptr_metadata` call) just go through the valtree arm of the function, so it's easier to just create a `mir::Const` directly for those.

For the instsimplify case, if we have a type system const we should *keep* having a type system const, rather than turning it into a `mir::Const::Value`; it doesn't really matter in practice, though, bc `usize` has no padding, but it feels more principled.
2025-01-26 09:26:34 +00:00
..
coroutine Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
coverage Auto merge of #128657 - clubby789:optimize-none, r=fee1-dead,WaffleLapkin 2025-01-25 05:50:36 +00:00
inline use TypingEnv when no infcx is available 2024-11-18 10:38:56 +01:00
shim mir: require is_cleanup when creating BasicBlockData 2024-12-18 20:43:54 +08:00
abort_unwinding_calls.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
add_call_guards.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
add_moves_for_packed_drops.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
add_retag.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
add_subtyping_projections.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
check_alignment.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
check_call_recursion.rs Consolidate ad-hoc MIR lints into real pass-manager-based MIR lints 2025-01-18 21:25:47 +00:00
check_const_item_mutation.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
check_inline.rs Consolidate ad-hoc MIR lints into real pass-manager-based MIR lints 2025-01-18 21:25:47 +00:00
check_packed_ref.rs use TypingEnv when no infcx is available 2024-11-18 10:38:56 +01:00
check_undefined_transmutes.rs Add a Lint for Pointer to Integer Transmutes in Consts 2024-10-05 12:48:02 +00:00
cleanup_post_borrowck.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
copy_prop.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
coroutine.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
cost_checker.rs use TypingEnv when no infcx is available 2024-11-18 10:38:56 +01:00
cross_crate_inline.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
ctfe_limit.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
dataflow_const_prop.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
dead_store_elimination.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
deduce_param_attrs.rs rename BitSet to DenseBitSet 2025-01-11 11:34:01 +00:00
deduplicate_blocks.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
deref_separator.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
dest_prop.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
dump_mir.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
early_otherwise_branch.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
elaborate_box_derefs.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
elaborate_drops.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
errors.rs Consolidate ad-hoc MIR lints into real pass-manager-based MIR lints 2025-01-18 21:25:47 +00:00
ffi_unwind_calls.rs compiler: Directly use rustc_abi in mir_transform 2024-11-03 13:38:47 -08:00
function_item_references.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
gvn.rs Auto merge of #135753 - compiler-errors:from-ty-const, r=oli-obk 2025-01-26 09:26:34 +00:00
impossible_predicates.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
inline.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
instsimplify.rs Auto merge of #135753 - compiler-errors:from-ty-const, r=oli-obk 2025-01-26 09:26:34 +00:00
jump_threading.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
known_panics_lint.rs Revert "Auto merge of #134330 - scottmcm:no-more-rvalue-len, r=matthewjasper" 2025-01-18 22:09:34 +00:00
large_enums.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
lib.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
lint_tail_expr_drop_order.rs remove more redundant into() conversions 2025-01-10 07:08:28 +01:00
lint.rs rename BitSet to DenseBitSet 2025-01-11 11:34:01 +00:00
lower_intrinsics.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
lower_slice_len.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
match_branches.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
mentioned_items.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
multiple_return_terminators.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
nrvo.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
pass_manager.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
post_analysis_normalize.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
post_drop_elaboration.rs Make check_live_drops into a MirLint. 2024-09-10 09:11:17 +10:00
prettify.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
promote_consts.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
ref_prop.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
remove_noop_landing_pads.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
remove_place_mention.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
remove_storage_markers.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
remove_uninit_drops.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
remove_unneeded_drops.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
remove_zsts.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
required_consts.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
sanity_check.rs Move MirPass to rustc_mir_transform. 2024-09-03 16:03:46 +10:00
shim.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
simplify_branches.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
simplify_comparison_integral.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
simplify.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
single_use_consts.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
sroa.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
ssa.rs rename BitSet to DenseBitSet 2025-01-11 11:34:01 +00:00
strip_debuginfo.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
unreachable_enum_branching.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
unreachable_prop.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
validate.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00