rust/compiler/rustc_const_eval
bors b5eb9893f4 Auto merge of #141406 - RalfJung:less-force-allocate, r=oli-obk
interpret: do not force_allocate all return places

A while ago I cleaned up our `PlaceTy` a little, but as a side-effect of that, return places had to always be force-allocated. That turns out to cause quite a few extra allocations, and for a project we are doing where we marry Miri with a model checker, that means a lot of extra work -- local variables are just so much easier to reason about than allocations.

So, this PR brings back the ability to have the return place be just a local of the caller. To make this work cleanly I had to rework stack pop handling a bit, which also changes the output of Miri in some cases as the span for errors occurring during a particular phase of stack pop changed.

With these changes, a no-std binary with a function of functions that just take and return scalar types and that uses no pointers now does not move *any* local variables into memory. :)

r? `@oli-obk`
2025-05-26 10:29:19 +00:00
..
src Auto merge of #141406 - RalfJung:less-force-allocate, r=oli-obk 2025-05-26 10:29:19 +00:00
Cargo.toml don't depend on rustc_attr_parsing if rustc_data_structures will do 2025-05-09 23:16:55 +02:00
messages.ftl const-check: stop recommending the use of rustc_allow_const_fn_unstable 2025-05-25 22:47:21 +02:00