File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
compiler/rustc_mir_dataflow/src Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -675,6 +675,15 @@ impl Map {
675675 self . cache_preorder_invoke ( place) ;
676676 }
677677 }
678+
679+ // Trim useless places.
680+ for opt_place in self . locals . iter_mut ( ) {
681+ if let Some ( place) = * opt_place && self . inner_values [ place] . is_empty ( ) {
682+ * opt_place = None ;
683+ }
684+ }
685+ #[ allow( rustc:: potential_query_instability) ]
686+ self . projections . retain ( |_, child| !self . inner_values [ * child] . is_empty ( ) ) ;
678687 }
679688
680689 /// Potentially register the (local, projection) place and its fields, recursively.
@@ -803,7 +812,7 @@ impl Map {
803812 tail_elem : Option < TrackElem > ,
804813 f : & mut impl FnMut ( ValueIndex ) ,
805814 ) {
806- if place. is_indirect ( ) {
815+ if place. has_deref ( ) {
807816 // We do not track indirect places.
808817 return ;
809818 }
You can’t perform that action at this time.
0 commit comments