]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/borrow_check/nll/region_infer/values.rs
build up the placeholder indices as we go
[rust.git] / src / librustc_mir / borrow_check / nll / region_infer / values.rs
index 6407661d2921f50178bade326383d3c781fbb50b..07372c19c46c936040bd8bf44f8615f7c5f90fab 100644 (file)
@@ -302,13 +302,13 @@ impl<N: Idx> RegionValues<N> {
     crate fn new(
         elements: &Rc<RegionValueElements>,
         num_universal_regions: usize,
-        placeholder_indices: PlaceholderIndices,
+        placeholder_indices: &Rc<PlaceholderIndices>,
     ) -> Self {
         let num_placeholders = placeholder_indices.len();
         Self {
             elements: elements.clone(),
             points: SparseBitMatrix::new(elements.num_points),
-            placeholder_indices: Rc::new(placeholder_indices),
+            placeholder_indices: placeholder_indices.clone(),
             free_regions: SparseBitMatrix::new(num_universal_regions),
             placeholders: SparseBitMatrix::new(num_placeholders),
         }