loosen restriction on when GeneratorWitness: Clone
This commit is contained in:
parent
0228c073e0
commit
a5cb3cca5e
1 changed files with 13 additions and 17 deletions
|
@ -1958,8 +1958,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
}
|
||||
|
||||
ty::GeneratorWitness(binder) => {
|
||||
match binder.no_bound_vars() {
|
||||
Some(tys) => {
|
||||
let tys = self.tcx().erase_late_bound_regions(binder);
|
||||
let mut iter = tys.iter();
|
||||
loop {
|
||||
let ty = match iter.next() {
|
||||
|
@ -1973,9 +1972,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
break Ambiguous;
|
||||
}
|
||||
}
|
||||
},
|
||||
Option::None => None,
|
||||
}
|
||||
}
|
||||
|
||||
ty::Closure(_, substs) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue