Skip to content

Commit 79f4710

Browse files
committed
change print-out for regions to include # of elements
1 parent 1ef1b92 commit 79f4710

File tree

1 file changed

+4
-1
lines changed
  • src/librustc_mir/borrow_check/nll/region_infer

1 file changed

+4
-1
lines changed

src/librustc_mir/borrow_check/nll/region_infer/values.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ impl RegionValues {
376376
sep = ", ";
377377
};
378378

379+
let mut counter = 0;
379380
for element in self.elements_contained_in(r) {
380381
match element {
381382
RegionElement::Location(l) => {
@@ -405,6 +406,8 @@ impl RegionValues {
405406
result.push_str(&format!("{:?}", fr));
406407
}
407408
}
409+
410+
counter += 1;
408411
}
409412

410413
if let Some((location1, location2)) = open_location {
@@ -414,7 +417,7 @@ impl RegionValues {
414417

415418
result.push_str("}");
416419

417-
result
420+
format!("{} elements / {}", counter, result)
418421
}
419422

420423
fn push_location_range(str: &mut String, location1: Location, location2: Location) {

0 commit comments

Comments
 (0)