Files
rust/compiler/rustc_mir_transform
Nicholas Nethercote 9072e4a02b Separate InterpCx usage by ConstAnalysis phases
`ConstAnalysis` has a `RefCell<InterpCx>`. During the analysis phase the
accesses are read-only, but the visiting phase (performed by
`Collector`) requires mutation, because of calls to `try_make_constant`.

This commit removes the `RefCell` by having two `InterpCx` instances: a
read-only one for the `ConstAnalysis` and a mutable one for the visiting
phase, stored in `Collector`. This removes the need for the
`OperandCollector::ecx` field, and for many `borrow`/`borrow_mut` calls.
2026-07-20 15:03:40 +10:00
..
2026-06-24 23:18:10 +01:00