Use upvar_tys in more places, make it a list
This commit is contained in:
parent
d12c6e947c
commit
99969d282b
17 changed files with 66 additions and 78 deletions
|
@ -2169,7 +2169,8 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
|
|||
let all = args
|
||||
.as_generator()
|
||||
.upvar_tys()
|
||||
.chain(iter::once(args.as_generator().witness()))
|
||||
.iter()
|
||||
.chain([args.as_generator().witness()])
|
||||
.collect::<Vec<_>>();
|
||||
Where(obligation.predicate.rebind(all))
|
||||
}
|
||||
|
@ -2210,7 +2211,7 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
|
|||
// Not yet resolved.
|
||||
Ambiguous
|
||||
} else {
|
||||
Where(obligation.predicate.rebind(args.as_closure().upvar_tys().collect()))
|
||||
Where(obligation.predicate.rebind(args.as_closure().upvar_tys().to_vec()))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue