rust/compiler/rustc_mir_transform
Nicholas Nethercote 3ebe058fad Make ConstAnalysis::ecx a RefCell.
Of the many dataflow analyses, `ConstAnalysis` is the only one that requires
the analysis be mutabile when used with `ResultsVisitor`. It's needed
because of the `ecx` field -- `ecx.intern_with_temp_alloc` is called
during visiting and it takes `&mut self`.

This commit changes `ConstAnalysis` to use interior mutability for the
`ecx` field. This is a bit annoying for `ConstAnalysis`, but it will
allow more immutability in `ResultsVisitor`, as seen in the next commit.
2025-10-27 16:36:13 +11:00
..
2025-10-27 16:36:13 +11:00
2025-09-13 17:14:04 +00:00