Simplify slice indexing in next trait solver
This commit is contained in:
parent
f7cc13af82
commit
e485cc5e02
1 changed files with 5 additions and 7 deletions
|
@ -442,13 +442,11 @@ where
|
|||
{
|
||||
// In case any fresh inference variables have been created between `state`
|
||||
// and the previous instantiation, extend `orig_values` for it.
|
||||
assert!(orig_values.len() <= state.value.var_values.len());
|
||||
for &arg in &state.value.var_values.var_values.as_slice()
|
||||
[orig_values.len()..state.value.var_values.len()]
|
||||
{
|
||||
let unconstrained = delegate.fresh_var_for_kind_with_span(arg, span);
|
||||
orig_values.push(unconstrained);
|
||||
}
|
||||
orig_values.extend(
|
||||
state.value.var_values.var_values.as_slice()[orig_values.len()..]
|
||||
.iter()
|
||||
.map(|&arg| delegate.fresh_var_for_kind_with_span(arg, span)),
|
||||
);
|
||||
|
||||
let instantiation =
|
||||
EvalCtxt::compute_query_response_instantiation_values(delegate, orig_values, &state);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue