diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-11-24 13:13:09 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-11-24 13:13:09 +1100 |
| commit | 912eb1f7c196c840536b45b2a2781639552ff884 (patch) | |
| tree | fae63b441377f1f05a716f92c21095311cf0a8f3 | |
| parent | 406c0b8ae4f1f1f8406b30890cbbc0062ca2505c (diff) | |
| download | rust-912eb1f7c196c840536b45b2a2781639552ff884.tar.gz rust-912eb1f7c196c840536b45b2a2781639552ff884.zip | |
Remove `ResultsCursor::get_with_analysis`.
We can just call `ResultsCursor::state` and `ResultsCursor::analysis` separately.
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/framework/cursor.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/rustc_peek.rs | 3 |
2 files changed, 2 insertions, 6 deletions
diff --git a/compiler/rustc_mir_dataflow/src/framework/cursor.rs b/compiler/rustc_mir_dataflow/src/framework/cursor.rs index 6285199e5b6..c9bce80853d 100644 --- a/compiler/rustc_mir_dataflow/src/framework/cursor.rs +++ b/compiler/rustc_mir_dataflow/src/framework/cursor.rs @@ -166,11 +166,6 @@ where &mut self.results.borrow_mut().analysis } - /// Returns both the dataflow state at the current location and the `Analysis`. - pub fn get_with_analysis(&mut self) -> (&A::Domain, &mut A) { - (&self.state, &mut self.results.borrow_mut().analysis) - } - /// Resets the cursor to hold the entry set for the given basic block. /// /// For forward dataflow analyses, this is the dataflow state prior to the first statement. diff --git a/compiler/rustc_mir_dataflow/src/rustc_peek.rs b/compiler/rustc_mir_dataflow/src/rustc_peek.rs index b592b2f5d41..448128b6993 100644 --- a/compiler/rustc_mir_dataflow/src/rustc_peek.rs +++ b/compiler/rustc_mir_dataflow/src/rustc_peek.rs @@ -139,7 +139,8 @@ where ) => { let loc = Location { block: bb, statement_index }; cursor.seek_before_primary_effect(loc); - let (state, analysis) = cursor.get_with_analysis(); + let state = cursor.get(); + let analysis = cursor.analysis(); analysis.peek_at(tcx, *place, state, call); } |
