Skip to content

Commit 5514fe9

Browse files
Rollup merge of #140234 - nnethercote:separate-Analysis-and-Results, r=davidtwco
Separate dataflow analysis and results `Analysis` gets put into `Results` with `EntryStates`, by `iterate_to_fixpoint`. This has two problems: - `Results` is passed various places where only `Analysis` is needed. - `EntryStates` is passed around mutably everywhere even though it is immutable. This commit mostly separates `Analysis` from `Results` and fixes these two problems. r? `@davidtwco`
2 parents 619bf55 + ed695f4 commit 5514fe9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/mir/dataflow.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,7 @@ whereas this code uses [`ResultsCursor`]:
148148

149149
```rust,ignore
150150
let mut results = MyAnalysis::new()
151-
.into_engine(tcx, body, def_id)
152-
.iterate_to_fixpoint()
151+
.iterate_to_fixpoint(tcx, body, None);
153152
.into_results_cursor(body);
154153
155154
// Inspect the fixpoint state immediately before each `Drop` terminator.

0 commit comments

Comments
 (0)