@@ -720,7 +720,7 @@ impl Map {
720
720
/// This is currently the only way to create a [`Map`]. The way in which the tracked places are
721
721
/// chosen is an implementation detail and may not be relied upon (other than that their type
722
722
/// are scalars).
723
- pub fn new < ' tcx > ( tcx : TyCtxt < ' tcx > , body : & Body < ' tcx > , value_limit : Option < usize > ) -> Self {
723
+ pub fn new < ' tcx > ( tcx : TyCtxt < ' tcx > , body : & Body < ' tcx > , place_limit : Option < usize > ) -> Self {
724
724
let mut map = Self {
725
725
locals : IndexVec :: new ( ) ,
726
726
projections : FxHashMap :: default ( ) ,
@@ -730,7 +730,7 @@ impl Map {
730
730
inner_values_buffer : Vec :: new ( ) ,
731
731
} ;
732
732
let exclude = excluded_locals ( body) ;
733
- map. register ( tcx, body, exclude, value_limit ) ;
733
+ map. register ( tcx, body, exclude, place_limit ) ;
734
734
debug ! ( "registered {} places ({} nodes in total)" , map. value_count, map. places. len( ) ) ;
735
735
map
736
736
}
@@ -741,9 +741,9 @@ impl Map {
741
741
tcx : TyCtxt < ' tcx > ,
742
742
body : & Body < ' tcx > ,
743
743
exclude : BitSet < Local > ,
744
- value_limit : Option < usize > ,
744
+ place_limit : Option < usize > ,
745
745
) {
746
- let mut worklist = VecDeque :: with_capacity ( value_limit . unwrap_or ( body. local_decls . len ( ) ) ) ;
746
+ let mut worklist = VecDeque :: with_capacity ( place_limit . unwrap_or ( body. local_decls . len ( ) ) ) ;
747
747
let param_env = tcx. param_env_reveal_all_normalized ( body. source . def_id ( ) ) ;
748
748
749
749
// Start by constructing the places for each bare local.
@@ -766,8 +766,8 @@ impl Map {
766
766
// `elem1` is either `Some(Variant(i))` or `None`.
767
767
while let Some ( ( mut place, elem1, elem2, ty) ) = worklist. pop_front ( ) {
768
768
// The user requires a bound on the number of created values.
769
- if let Some ( value_limit ) = value_limit
770
- && self . value_count >= value_limit
769
+ if let Some ( place_limit ) = place_limit
770
+ && self . places . len ( ) >= place_limit
771
771
{
772
772
break ;
773
773
}
0 commit comments