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 {
675
675
self . cache_preorder_invoke ( place) ;
676
676
}
677
677
}
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 ( ) ) ;
678
687
}
679
688
680
689
/// Potentially register the (local, projection) place and its fields, recursively.
@@ -803,7 +812,7 @@ impl Map {
803
812
tail_elem : Option < TrackElem > ,
804
813
f : & mut impl FnMut ( ValueIndex ) ,
805
814
) {
806
- if place. is_indirect ( ) {
815
+ if place. has_deref ( ) {
807
816
// We do not track indirect places.
808
817
return ;
809
818
}
You can’t perform that action at this time.
0 commit comments