rust/compiler/rustc_mir_transform/src
bors c62b732724 Auto merge of #135709 - lqd:bring-back-len, r=compiler-errors
Temporarily bring back `Rvalue::Len`

r? `@compiler-errors` as requested in https://github.com/rust-lang/rust/issues/135671#issuecomment-2599580364

> However, in the mean time, I'd rather we not crunch trying to find and more importantly validate the soundness of a solution 🤔

Agreed. To fix the IMO P-critical #135671 for which we somehow didn't have test coverage, this PR temporarily reverts:
- https://github.com/rust-lang/rust/pull/133734
- its bugfix https://github.com/rust-lang/rust/pull/134371
- https://github.com/rust-lang/rust/pull/134330

cc `@scottmcm`

I added the few samples from that issue as a test, but we can add more in the future, in particular it seems `@steffahn` [will work on that](https://github.com/rust-lang/rust/issues/135671#issuecomment-2599714354).

Fixes #135671. And if we want to land this, it should also be nominated for beta backport.
2025-01-19 06:09:51 +00:00
..
coroutine Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
coverage coverage: Add a few more comments to counter creation 2025-01-18 22:14:16 +11: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 compiler: Directly use rustc_abi in mir_transform 2024-11-03 13:38:47 -08:00
add_call_guards.rs Inline and remove some functions. 2024-09-10 08:54:17 +10:00
add_moves_for_packed_drops.rs use TypingEnv when no infcx is available 2024-11-18 10:38:56 +01:00
add_retag.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
add_subtyping_projections.rs Inline and remove some functions. 2024-09-10 08:54:17 +10:00
check_alignment.rs move fn is_item_raw to TypingEnv 2024-11-19 18:06:20 +01: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 be even more precise about "cast" vs "coercion" 2024-09-24 23:12:02 +02:00
copy_prop.rs rename BitSet to DenseBitSet 2025-01-11 11:34:01 +00:00
coroutine.rs rename BitSet to DenseBitSet 2025-01-11 11:34:01 +00:00
cost_checker.rs use TypingEnv when no infcx is available 2024-11-18 10:38:56 +01:00
cross_crate_inline.rs mir_transform: implement forced inlining 2025-01-10 18:37:54 +00:00
ctfe_limit.rs Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
dataflow_const_prop.rs Revert "Auto merge of #134330 - scottmcm:no-more-rvalue-len, r=matthewjasper" 2025-01-18 22:09:34 +00:00
dead_store_elimination.rs rename BitSet to DenseBitSet 2025-01-11 11:34:01 +00:00
deduce_param_attrs.rs rename BitSet to DenseBitSet 2025-01-11 11:34:01 +00:00
deduplicate_blocks.rs Rename and reorder lots of lifetimes. 2024-09-13 15:46:20 +10:00
deref_separator.rs Use LocalDecls in a couple of places. 2024-09-09 15:15:44 +10:00
dest_prop.rs Revert "Auto merge of #134330 - scottmcm:no-more-rvalue-len, r=matthewjasper" 2025-01-18 22:09:34 +00:00
dump_mir.rs Dogfood feature(file_buffered) 2024-09-24 14:25:16 -07:00
early_otherwise_branch.rs mir-opt: Do not handle the cleanup BB in the EarlyOtherwiseBranch 2024-12-18 20:43:55 +08:00
elaborate_box_derefs.rs Transmute from NonNull to pointer when elaborating a box deref (MCP807) 2025-01-06 18:43:40 -08:00
elaborate_drops.rs rename BitSet to DenseBitSet 2025-01-11 11:34:01 +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 Revert "Auto merge of #134330 - scottmcm:no-more-rvalue-len, r=matthewjasper" 2025-01-18 22:09:34 +00:00
impossible_predicates.rs Make MIR cleanup for functions with impossible predicates into a real MIR pass 2025-01-11 20:50:39 +00:00
inline.rs Consolidate ad-hoc MIR lints into real pass-manager-based MIR lints 2025-01-18 21:25:47 +00:00
instsimplify.rs Revert "Auto merge of #133734 - scottmcm:lower-indexing-to-ptrmetadata, r=davidtwco,RalfJung" 2025-01-18 22:09:35 +00:00
jump_threading.rs rename BitSet to DenseBitSet 2025-01-11 11:34:01 +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 make no-variant types a dedicated Variants variant 2024-12-18 11:01:54 +01:00
lib.rs Consolidate ad-hoc MIR lints into real pass-manager-based MIR lints 2025-01-18 21:25:47 +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 Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
lower_slice_len.rs Inline and remove some functions. 2024-09-10 08:54:17 +10:00
match_branches.rs MatchBranchSimplification: Consider empty-unreachable otherwise branch 2024-12-27 10:57:46 +00:00
mentioned_items.rs be even more precise about "cast" vs "coercion" 2024-09-24 23:12:02 +02:00
multiple_return_terminators.rs rename BitSet to DenseBitSet 2025-01-11 11:34:01 +00:00
nrvo.rs rename BitSet to DenseBitSet 2025-01-11 11:34:01 +00:00
pass_manager.rs mir_transform: implement forced inlining 2025-01-10 18:37:54 +00:00
post_analysis_normalize.rs rebase 2024-11-23 13:52:57 +01:00
post_drop_elaboration.rs Make check_live_drops into a MirLint. 2024-09-10 09:11:17 +10:00
prettify.rs rename BitSet to DenseBitSet 2025-01-11 11:34:01 +00:00
promote_consts.rs Revert "Auto merge of #134330 - scottmcm:no-more-rvalue-len, r=matthewjasper" 2025-01-18 22:09:34 +00:00
ref_prop.rs rename BitSet to DenseBitSet 2025-01-11 11:34:01 +00:00
remove_noop_landing_pads.rs rename BitSet to DenseBitSet 2025-01-11 11:34:01 +00:00
remove_place_mention.rs Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
remove_storage_markers.rs Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
remove_uninit_drops.rs Change ChunkedBitSet<MovePathIndex>s to MixedBitSet. 2024-12-05 20:07:26 +11:00
remove_unneeded_drops.rs Remove -Zfuel. 2024-11-26 10:45:21 +00:00
remove_zsts.rs Address PR feedback 2025-01-11 15:56:58 -08: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 inline: force inlining shims 2025-01-10 18:37:55 +00:00
simplify_branches.rs use TypingEnv when no infcx is available 2024-11-18 10:38:56 +01:00
simplify_comparison_integral.rs use TypingEnv when no infcx is available 2024-11-18 10:38:56 +01:00
simplify.rs reduce false positives of tail-expr-drop-order from consumed values 2024-11-20 20:53:11 +08:00
single_use_consts.rs rename BitSet to DenseBitSet 2025-01-11 11:34:01 +00:00
sroa.rs rename BitSet to DenseBitSet 2025-01-11 11:34:01 +00:00
ssa.rs rename BitSet to DenseBitSet 2025-01-11 11:34:01 +00:00
strip_debuginfo.rs We don't need NonNull::as_ptr debuginfo 2024-12-10 01:29:43 -08:00
unreachable_enum_branching.rs make no-variant types a dedicated Variants variant 2024-12-18 11:01:54 +01:00
unreachable_prop.rs Remove -Zfuel. 2024-11-26 10:45:21 +00:00
validate.rs Revert "Auto merge of #133734 - scottmcm:lower-indexing-to-ptrmetadata, r=davidtwco,RalfJung" 2025-01-18 22:09:35 +00:00