rust/compiler/rustc_mir_dataflow
Nicholas Nethercote a8ce44f7d9 Simplify graphviz::Formatter.
`Formatter` currently has a `RefCell<Option<Results>>` field. This is so
the `Results` can be temporarily taken and put into a `ResultsCursor`
that is used by `BlockFormatter`, and then put back, which is messy.

This commit changes `Formatter` to have a `RefCell<ResultsCursor>` and
`BlockFormatter` to have a `&mut ResultsCursor`, which greatly
simplifies the code at the `Formatter`/`BlockFormatter` interaction
point in `Formatter::node_label`. It also means we construct a
`ResultsCursor` once per `Formatter`, instead of once per `node_label`
call.

The commit also:
- documents the reason for the `RefCell`;
- adds a `Formatter::body` method, replacing the `Formatter::body`
  field.
2024-10-30 13:19:29 +11:00
..
src Simplify graphviz::Formatter. 2024-10-30 13:19:29 +11:00
Cargo.toml Replace custom_encodable with encodable. 2023-11-22 18:37:14 +11:00
messages.ftl Ensure Fluent messages are in alphabetical order 2023-05-25 23:49:35 +00:00