1
Fork 0

Doc-comment IndexVec::from_elem and use it in a few more places

This commit is contained in:
Scott McMurray 2023-04-03 14:22:09 -07:00
parent bf41e753ec
commit 5c3e5af2ed
5 changed files with 17 additions and 7 deletions

View file

@ -203,7 +203,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
// Tracks the `VarSubVar` constraints generated for each region vid. We
// later use this to expand across vids.
let mut constraints = IndexVec::from_elem_n(Vec::new(), var_values.values.len());
let mut constraints = IndexVec::from_elem(Vec::new(), &var_values.values);
// Tracks the changed region vids.
let mut changes = Vec::new();
for constraint in self.data.constraints.keys() {