rust/compiler/rustc_mir_transform/src
Matthias Krüger 32e0fe129d
Rollup merge of #128762 - fmease:use-more-slice-pats, r=compiler-errors
Use more slice patterns inside the compiler

Nothing super noteworthy. Just replacing the common 'fragile' pattern of "length check followed by indexing or unwrap" with slice patterns for legibility and 'robustness'.

r? ghost
2024-08-11 07:51:51 +02:00
..
coroutine Rename InstanceDef -> InstanceKind 2024-06-16 21:35:21 -04:00
coverage Use more slice patterns inside the compiler 2024-08-07 13:37:52 +02:00
inline Reformat use declarations. 2024-07-29 08:26:52 +10:00
shim Rename InstanceDef -> InstanceKind 2024-06-16 21:35:21 -04:00
abort_unwinding_calls.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
add_call_guards.rs remove redundant imports 2023-12-10 10:56:22 +08:00
add_moves_for_packed_drops.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
add_retag.rs Use is_lang_item more aggressively 2024-06-14 16:54:29 -04:00
add_subtyping_projections.rs remove redundant imports 2023-12-10 10:56:22 +08:00
check_alignment.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
check_const_item_mutation.rs Rename TyCtxt::emit_spanned_lint as TyCtxt::emit_node_span_lint. 2024-01-23 08:09:05 +11:00
check_packed_ref.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
cleanup_post_borrowck.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
copy_prop.rs Merge borrowed locals too. 2024-04-20 19:20:38 +00:00
coroutine.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
cost_checker.rs Fix conflicts after rebase 2024-07-07 18:16:38 +02:00
cross_crate_inline.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
ctfe_limit.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
dataflow_const_prop.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
dead_store_elimination.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
deduce_param_attrs.rs consistency rename: language item -> lang item 2024-04-17 13:00:43 +02:00
deduplicate_blocks.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
deref_separator.rs remove redundant imports 2023-12-10 10:56:22 +08:00
dest_prop.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
dump_mir.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
early_otherwise_branch.rs Use more slice patterns inside the compiler 2024-08-07 13:37:52 +02:00
elaborate_box_derefs.rs Stop doing weird index stuff in ElaborateBoxDerefs 2024-08-02 17:45:55 -04:00
elaborate_drops.rs Stop using MoveDataParamEnv for places that don't need a param-env 2024-07-29 11:59:47 -04:00
errors.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
ffi_unwind_calls.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
function_item_references.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
gvn.rs Do not intern if we have provenance. 2024-07-31 00:59:13 +00:00
inline.rs Don't inline tainted MIR bodies 2024-08-08 20:53:25 -04:00
instsimplify.rs Use more slice patterns inside the compiler 2024-08-07 13:37:52 +02:00
jump_threading.rs Disable jump threading of float equality 2024-07-27 15:11:59 +02:00
known_panics_lint.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
large_enums.rs Simplify use crate::rustc_foo::bar occurrences. 2024-05-08 16:57:31 +10:00
lib.rs MIR required_consts, mentioned_items: ensure we do not forget to fill these lists 2024-08-01 15:49:25 +02:00
lint.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
lower_intrinsics.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
lower_slice_len.rs Replace NormalizeArrayLen with GVN 2024-06-20 22:16:59 -07:00
match_branches.rs Re-enable SimplifyToExp in match_branches. 2024-08-03 10:55:46 +08:00
mentioned_items.rs MIR required_consts, mentioned_items: ensure we do not forget to fill these lists 2024-08-01 15:49:25 +02:00
multiple_return_terminators.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
nrvo.rs Revert "Auto merge of #115105 - cjgillot:dest-prop-default, r=oli-obk" 2024-05-31 00:22:40 +00:00
pass_manager.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
prettify.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
promote_consts.rs MIR required_consts, mentioned_items: ensure we do not forget to fill these lists 2024-08-01 15:49:25 +02:00
ref_prop.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
remove_noop_landing_pads.rs Support tail calls in mir via TerminatorKind::TailCall 2024-07-07 17:11:04 +02:00
remove_place_mention.rs remove redundant imports 2023-12-10 10:56:22 +08:00
remove_storage_markers.rs Move condition enabling the pass to is_enabled 2024-01-23 20:58:44 +01:00
remove_uninit_drops.rs Stop using MoveDataParamEnv for places that don't need a param-env 2024-07-29 11:59:47 -04:00
remove_unneeded_drops.rs Merge dead bb pruning and unreachable bb deduplication. 2024-01-07 15:12:10 +00:00
remove_zsts.rs Add CoroutineClosure to TyKind, AggregateKind, UpvarArgs 2024-02-06 02:22:58 +00:00
required_consts.rs MIR required_consts, mentioned_items: ensure we do not forget to fill these lists 2024-08-01 15:49:25 +02:00
reveal_all.rs MIR visitor: constant -> const_operand 2024-06-13 15:37:13 +02:00
shim.rs MIR required_consts, mentioned_items: ensure we do not forget to fill these lists 2024-08-01 15:49:25 +02:00
simplify_branches.rs simplify_branches: add comment 2024-03-24 12:53:03 +01:00
simplify_comparison_integral.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
simplify.rs rustc_index: Add a ZERO constant to index types 2024-04-03 19:06:22 +03:00
single_use_consts.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
sroa.rs Use is_lang_item more aggressively 2024-06-14 16:54:29 -04:00
ssa.rs Remove extern crate rustc_middle from rustc_mir_transform. 2024-05-13 08:20:18 +10:00
unreachable_enum_branching.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
unreachable_prop.rs Remove extern crate rustc_middle from rustc_mir_transform. 2024-05-13 08:20:18 +10:00
validate.rs Use more slice patterns inside the compiler 2024-08-07 13:37:52 +02:00