Rollup merge of #109913 - scottmcm:index-slice, r=WaffleLapkin
Doc-comment `IndexVec::from_elem` and use it in a few more places Since this PR is a reply to https://github.com/rust-lang/rust/pull/109819#discussion_r1156128164, r? ``@WaffleLapkin``
This commit is contained in:
commit
5485a54e19
5 changed files with 17 additions and 7 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue