rust/compiler/rustc_middle/src
bors 136dab6614 Auto merge of #113569 - RalfJung:miri, r=oli-obk
miri: protect Move() function arguments during the call

This gives `Move` operands a meaning specific to function calls:
- for the duration of the call, the place the operand comes from is protected, making all read and write accesses insta-UB.
- the contents of that place are reset to `Uninit`, so looking at them again after the function returns, we cannot observe their contents

Turns out we can replace the existing "retag return place" hack with the exact same sort of protection on the return place, which is nicely symmetric.

Fixes https://github.com/rust-lang/rust/issues/112564
Fixes https://github.com/rust-lang/miri/issues/2927

This starts with a Miri rustc-push, since we'd otherwise conflict with a PR that recently landed in Miri.
(The "miri tree borrows" commit is an unrelated cleanup I noticed while doing the PR. I can remove it if you prefer.)
r? `@oli-obk`
2023-07-12 10:19:42 +00:00
..
dep_graph Allow LocalDefId as the argument to def_path_str 2023-04-21 22:27:20 +00:00
hir Replace RPITIT current impl with new strategy that lowers as a GAT 2023-07-08 18:21:34 -03:00
infer Move TyCtxt::mk_x to Ty::new_x where applicable 2023-07-05 20:27:07 +01:00
middle privacy: Rename some variables for clarity 2023-06-15 21:25:47 +03:00
mir update Operand::Move docs 2023-07-11 21:59:01 +02:00
query get rid of a bit more calls to poly_select 2023-07-06 16:50:12 +00:00
thir Rename adjustment::PointerCast and variants using it to PointerCoercion 2023-07-07 18:17:16 +02:00
traits Add some extra information to opaque type cycle errors 2023-07-05 07:43:35 +00:00
ty Auto merge of #113573 - lcnr:typeck-results, r=compiler-errors 2023-07-12 07:50:40 +00:00
util Move expansion of query macros in rustc_middle to rustc_middle::query 2023-05-15 08:49:13 +02:00
arena.rs Migrate predicates_of and caller_bounds to Clause 2023-06-26 23:12:03 +00:00
error.rs Use translatable diagnostics in rustc_const_eval 2023-06-01 14:45:18 +00:00
lib.rs s/drain_filter/extract_if/ for Vec, Btree{Map,Set} and LinkedList 2023-06-14 09:28:54 +02:00
lint.rs Simplify some conditions 2023-06-27 07:40:47 +00:00
macros.rs Simplify CloneLiftImpls and TrivialTypeTraversalImpls. 2023-04-16 14:19:50 +10:00
metadata.rs rustc_metadata: Remove Span from ModChild 2023-04-18 17:25:04 +03:00
tests.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
thir.rs Rename adjustment::PointerCast and variants using it to PointerCoercion 2023-07-07 18:17:16 +02:00
values.rs Move TyCtxt::mk_x to Ty::new_x where applicable 2023-07-05 20:27:07 +01:00