rust/compiler/rustc_mir_dataflow
Nicholas Nethercote a97cd3ba57 Make Analysis immutable in many more places.
The `state: A::Domain` value is the primary things that's modified when
performing an analysis. The `Analysis` impl is immutable in every case
but one (`MaybeRequiredStorage`) and it now uses interior mutability.

As well as changing many `&mut A` arguments to `&A`, this also:
- lets `CowMut` be replaced with the simpler `SimpleCow` in `cursor.rs`;
- removes the need for the `RefCell` in `Formatter`;
- removes the need for `MaybeBorrowedLocals` to impl `Clone`, because
  it's a unit type and it's now clear that its constructor can be used
  directly instead of being put into a local variable and cloned.
2025-10-28 08:23:27 +11:00
..