Files
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
..
2022-10-01 10:03:06 +00:00
2022-11-18 14:24:48 +01:00
2022-11-26 18:04:54 -08:00
2022-08-30 01:40:14 -07:00
2022-11-26 18:04:54 -08:00
2022-08-30 01:40:14 -07:00
2022-08-30 01:40:14 -07:00
2022-10-01 10:03:06 +00:00
2022-12-01 08:38:47 +00:00
2022-12-01 08:38:47 +00:00
2022-11-15 17:59:36 +00:00