Commit e485cc5 1 parent f7cc13a commit e485cc5 Copy full SHA for e485cc5
File tree 1 file changed +5
-7
lines changed
compiler/rustc_next_trait_solver/src/solve/eval_ctxt
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -442,13 +442,11 @@ where
442
442
{
443
443
// In case any fresh inference variables have been created between `state`
444
444
// and the previous instantiation, extend `orig_values` for it.
445
- assert ! ( orig_values. len( ) <= state. value. var_values. len( ) ) ;
446
- for & arg in & state. value . var_values . var_values . as_slice ( )
447
- [ orig_values. len ( ) ..state. value . var_values . len ( ) ]
448
- {
449
- let unconstrained = delegate. fresh_var_for_kind_with_span ( arg, span) ;
450
- orig_values. push ( unconstrained) ;
451
- }
445
+ orig_values. extend (
446
+ state. value . var_values . var_values . as_slice ( ) [ orig_values. len ( ) ..]
447
+ . iter ( )
448
+ . map ( |& arg| delegate. fresh_var_for_kind_with_span ( arg, span) ) ,
449
+ ) ;
452
450
453
451
let instantiation =
454
452
EvalCtxt :: compute_query_response_instantiation_values ( delegate, orig_values, & state) ;
You can’t perform that action at this time.
0 commit comments