@@ -96,13 +96,13 @@ where
9696 // the value with `None`, move it into the results cursor, move it
9797 // back out, and return it to the refcell wrapped in `Some`.
9898 let mut fmt = BlockFormatter {
99- results : results. take ( ) . unwrap ( ) . into_results_cursor ( self . body ) ,
99+ cursor : results. take ( ) . unwrap ( ) . into_results_cursor ( self . body ) ,
100100 style : self . style ,
101101 bg : Background :: Light ,
102102 } ;
103103
104104 fmt. write_node_label ( & mut label, * block) . unwrap ( ) ;
105- Some ( fmt. results . into_results ( ) )
105+ Some ( fmt. cursor . into_results ( ) )
106106 } ) ;
107107 dot:: LabelText :: html ( String :: from_utf8 ( label) . unwrap ( ) )
108108 }
@@ -155,7 +155,7 @@ struct BlockFormatter<'mir, 'tcx, A>
155155where
156156 A : Analysis < ' tcx > ,
157157{
158- results : ResultsCursor < ' mir , ' tcx , A > ,
158+ cursor : ResultsCursor < ' mir , ' tcx , A > ,
159159 bg : Background ,
160160 style : OutputStyle ,
161161}
@@ -219,21 +219,21 @@ where
219219
220220 // C: State at start of block
221221 self . bg = Background :: Light ;
222- self . results . seek_to_block_start ( block) ;
223- let block_start_state = self . results . get ( ) . clone ( ) ;
222+ self . cursor . seek_to_block_start ( block) ;
223+ let block_start_state = self . cursor . get ( ) . clone ( ) ;
224224 self . write_row_with_full_state ( w, "" , "(on start)" ) ?;
225225
226226 // D + E: Statement and terminator transfer functions
227227 self . write_statements_and_terminator ( w, block) ?;
228228
229229 // F: State at end of block
230230
231- let terminator = self . results . body ( ) [ block] . terminator ( ) ;
231+ let terminator = self . cursor . body ( ) [ block] . terminator ( ) ;
232232
233233 // Write the full dataflow state immediately after the terminator if it differs from the
234234 // state at block entry.
235- self . results . seek_to_block_end ( block) ;
236- if self . results . get ( ) != & block_start_state || A :: Direction :: IS_BACKWARD {
235+ self . cursor . seek_to_block_end ( block) ;
236+ if self . cursor . get ( ) != & block_start_state || A :: Direction :: IS_BACKWARD {
237237 let after_terminator_name = match terminator. kind {
238238 mir:: TerminatorKind :: Call { target : Some ( _) , .. } => "(on unwind)" ,
239239 _ => "(on end)" ,
@@ -250,8 +250,8 @@ where
250250 match terminator. kind {
251251 mir:: TerminatorKind :: Call { destination, .. } => {
252252 self . write_row ( w, "" , "(on successful return)" , |this, w, fmt| {
253- let state_on_unwind = this. results . get ( ) . clone ( ) ;
254- this. results . apply_custom_effect ( |analysis, state| {
253+ let state_on_unwind = this. cursor . get ( ) . clone ( ) ;
254+ this. cursor . apply_custom_effect ( |analysis, state| {
255255 analysis. apply_call_return_effect (
256256 state,
257257 block,
@@ -265,18 +265,18 @@ where
265265 colspan = this. style. num_state_columns( ) ,
266266 fmt = fmt,
267267 diff = diff_pretty(
268- this. results . get( ) ,
268+ this. cursor . get( ) ,
269269 & state_on_unwind,
270- this. results . analysis( )
270+ this. cursor . analysis( )
271271 ) ,
272272 )
273273 } ) ?;
274274 }
275275
276276 mir:: TerminatorKind :: Yield { resume, resume_arg, .. } => {
277277 self . write_row ( w, "" , "(on yield resume)" , |this, w, fmt| {
278- let state_on_coroutine_drop = this. results . get ( ) . clone ( ) ;
279- this. results . apply_custom_effect ( |analysis, state| {
278+ let state_on_coroutine_drop = this. cursor . get ( ) . clone ( ) ;
279+ this. cursor . apply_custom_effect ( |analysis, state| {
280280 analysis. apply_call_return_effect (
281281 state,
282282 resume,
@@ -290,9 +290,9 @@ where
290290 colspan = this. style. num_state_columns( ) ,
291291 fmt = fmt,
292292 diff = diff_pretty(
293- this. results . get( ) ,
293+ this. cursor . get( ) ,
294294 & state_on_coroutine_drop,
295- this. results . analysis( )
295+ this. cursor . analysis( )
296296 ) ,
297297 )
298298 } ) ?;
@@ -302,8 +302,8 @@ where
302302 if !targets. is_empty ( ) =>
303303 {
304304 self . write_row ( w, "" , "(on successful return)" , |this, w, fmt| {
305- let state_on_unwind = this. results . get ( ) . clone ( ) ;
306- this. results . apply_custom_effect ( |analysis, state| {
305+ let state_on_unwind = this. cursor . get ( ) . clone ( ) ;
306+ this. cursor . apply_custom_effect ( |analysis, state| {
307307 analysis. apply_call_return_effect (
308308 state,
309309 block,
@@ -317,9 +317,9 @@ where
317317 colspan = this. style. num_state_columns( ) ,
318318 fmt = fmt,
319319 diff = diff_pretty(
320- this. results . get( ) ,
320+ this. cursor . get( ) ,
321321 & state_on_unwind,
322- this. results . analysis( )
322+ this. cursor . analysis( )
323323 ) ,
324324 )
325325 } ) ?;
@@ -407,9 +407,9 @@ where
407407 block : BasicBlock ,
408408 ) -> io:: Result < ( ) > {
409409 let diffs = StateDiffCollector :: run (
410- self . results . body ( ) ,
410+ self . cursor . body ( ) ,
411411 block,
412- self . results . mut_results ( ) ,
412+ self . cursor . mut_results ( ) ,
413413 self . style ,
414414 ) ;
415415
@@ -420,7 +420,7 @@ where
420420 if A :: Direction :: IS_FORWARD { it. next ( ) . unwrap ( ) } else { it. next_back ( ) . unwrap ( ) }
421421 } ;
422422
423- for ( i, statement) in self . results . body ( ) [ block] . statements . iter ( ) . enumerate ( ) {
423+ for ( i, statement) in self . cursor . body ( ) [ block] . statements . iter ( ) . enumerate ( ) {
424424 let statement_str = format ! ( "{statement:?}" ) ;
425425 let index_str = format ! ( "{i}" ) ;
426426
@@ -442,7 +442,7 @@ where
442442 assert ! ( diffs_after. is_empty( ) ) ;
443443 assert ! ( diffs_before. as_ref( ) . map_or( true , ExactSizeIterator :: is_empty) ) ;
444444
445- let terminator = self . results . body ( ) [ block] . terminator ( ) ;
445+ let terminator = self . cursor . body ( ) [ block] . terminator ( ) ;
446446 let mut terminator_str = String :: new ( ) ;
447447 terminator. kind . fmt_head ( & mut terminator_str) . unwrap ( ) ;
448448
@@ -492,8 +492,8 @@ where
492492 mir : & str ,
493493 ) -> io:: Result < ( ) > {
494494 self . write_row ( w, i, mir, |this, w, fmt| {
495- let state = this. results . get ( ) ;
496- let analysis = this. results . analysis ( ) ;
495+ let state = this. cursor . get ( ) ;
496+ let analysis = this. cursor . analysis ( ) ;
497497
498498 // FIXME: The full state vector can be quite long. It would be nice to split on commas
499499 // and use some text wrapping algorithm.
0 commit comments