rust/compiler/rustc_mir_transform/src
Matthias Krüger f1f7560598
Rollup merge of #105317 - RalfJung:retag-rework, r=oli-obk
make retagging work even with 'unstable' places

This is based on top of https://github.com/rust-lang/rust/pull/105301. Only the last two commits are new.

While investigating https://github.com/rust-lang/unsafe-code-guidelines/issues/381 I realized that we would have caught this issue much earlier if the add_retag pass wouldn't bail out on assignments of the form `*ptr = ...`.

So this PR changes our retag strategy:
- When a new reference is created via `Rvalue::Ref` (or a raw ptr via `Rvalue::AddressOf`), we do the retagging as part of just executing that address-taking operation.
- For everything else, we still insert retags -- these retags basically serve to ensure that references stored in local variables (and their fields) are always freshly tagged, so skipping this for assignments like `*ptr = ...` is less egregious.
r? ```@oli-obk```
2022-12-08 12:57:30 +01:00
..
coverage Create format_args as late as possible 2022-12-01 08:49:51 +00:00
inline
abort_unwinding_calls.rs
add_call_guards.rs
add_moves_for_packed_drops.rs Prefer doc comments over //-comments in compiler 2022-11-27 11:19:04 +00:00
add_retag.rs make retagging work even with 'unstable' places 2022-12-06 10:33:34 +01:00
check_const_item_mutation.rs
check_packed_ref.rs
check_unsafety.rs Add support for custom MIR parsing 2022-11-08 23:13:15 -08:00
cleanup_post_borrowck.rs
const_debuginfo.rs
const_goto.rs
const_prop_lint.rs interpret: use Either over Result when it is not representing an error condition 2022-11-18 10:18:32 +01:00
const_prop.rs review feedback 2022-11-18 14:24:48 +01:00
dataflow_const_prop.rs Disable limits if mir-opt-level >= 4 2022-11-12 20:14:34 +01:00
dead_store_elimination.rs Rewrite dest prop. 2022-11-26 18:04:54 -08:00
deaggregator.rs
deduce_param_attrs.rs Rewrite dest prop. 2022-11-26 18:04:54 -08:00
deduplicate_blocks.rs
deref_separator.rs
dest_prop.rs Create format_args as late as possible 2022-12-01 08:49:51 +00:00
dump_mir.rs Auto merge of #105220 - oli-obk:feeding, r=cjgillot 2022-12-06 03:47:41 +00:00
early_otherwise_branch.rs
elaborate_box_derefs.rs Prefer doc comments over //-comments in compiler 2022-11-27 11:19:04 +00:00
elaborate_drops.rs
ffi_unwind_calls.rs
function_item_references.rs Introduce PredicateKind::Clause 2022-11-25 00:04:54 -03:00
generator.rs make retagging work even with 'unstable' places 2022-12-06 10:33:34 +01:00
inline.rs Auto merge of #105119 - JakobDegen:inline-experiments, r=cjgillot 2022-12-06 00:53:01 +00:00
instcombine.rs
lib.rs Auto merge of #104170 - cjgillot:hir-def-id, r=fee1-dead 2022-11-17 07:42:27 +00:00
lower_intrinsics.rs
lower_slice_len.rs
match_branches.rs
multiple_return_terminators.rs
normalize_array_len.rs
nrvo.rs
pass_manager.rs Use zero based indexing for pass_count 2022-12-02 15:55:24 +00:00
remove_false_edges.rs
remove_noop_landing_pads.rs
remove_storage_markers.rs
remove_uninit_drops.rs
remove_unneeded_drops.rs
remove_zsts.rs Re-enable removal of ZST writes to unions 2022-12-03 19:17:45 -05:00
required_consts.rs Don't ICE when encountering ConstKind::Error in RequiredConstsVisitor 2022-11-10 05:14:04 +00:00
reveal_all.rs
separate_const_switch.rs
shim.rs make retagging work even with 'unstable' places 2022-12-06 10:33:34 +01:00
simplify_branches.rs Remove needless Cow 2022-12-01 08:38:47 +00:00
simplify_comparison_integral.rs
simplify_try.rs
simplify.rs Remove needless Cow 2022-12-01 08:38:47 +00:00
sroa.rs Enable SROA by at mir-opt level 3. 2022-11-15 17:59:36 +00:00
uninhabited_enum_branching.rs move things from rustc_target::abi to rustc_abi 2022-11-24 16:26:13 +03:30
unreachable_prop.rs