Skip to content

Commit 912eb1f

Browse files
committed
Remove ResultsCursor::get_with_analysis.
We can just call `ResultsCursor::state` and `ResultsCursor::analysis` separately.
1 parent 406c0b8 commit 912eb1f

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

compiler/rustc_mir_dataflow/src/framework/cursor.rs

-5
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,6 @@ where
166166
&mut self.results.borrow_mut().analysis
167167
}
168168

169-
/// Returns both the dataflow state at the current location and the `Analysis`.
170-
pub fn get_with_analysis(&mut self) -> (&A::Domain, &mut A) {
171-
(&self.state, &mut self.results.borrow_mut().analysis)
172-
}
173-
174169
/// Resets the cursor to hold the entry set for the given basic block.
175170
///
176171
/// For forward dataflow analyses, this is the dataflow state prior to the first statement.

compiler/rustc_mir_dataflow/src/rustc_peek.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ where
139139
) => {
140140
let loc = Location { block: bb, statement_index };
141141
cursor.seek_before_primary_effect(loc);
142-
let (state, analysis) = cursor.get_with_analysis();
142+
let state = cursor.get();
143+
let analysis = cursor.analysis();
143144
analysis.peek_at(tcx, *place, state, call);
144145
}
145146

0 commit comments

Comments
 (0)