diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2017-07-13 02:32:36 +0200 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2017-07-28 15:46:24 +0200 |
| commit | 75eb59895f0de231fd8fe66fd78518387c99b9fc (patch) | |
| tree | 5ba3f52744ea67f450c783d22589e56164aa0314 | |
| parent | 098d6f05971d68aa6e24a46a3505a4b9ec42d992 (diff) | |
| download | rust-75eb59895f0de231fd8fe66fd78518387c99b9fc.tar.gz rust-75eb59895f0de231fd8fe66fd78518387c99b9fc.zip | |
Copy a comment
| -rw-r--r-- | src/librustc/traits/select.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librustc/traits/select.rs b/src/librustc/traits/select.rs index 3fcd79f706b..9d5494d1fba 100644 --- a/src/librustc/traits/select.rs +++ b/src/librustc/traits/select.rs @@ -1500,6 +1500,9 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> { return Ok(()); } + // ok to skip binder because the substs on generator types never + // touch bound regions, they just capture the in-scope + // type/region parameters let self_ty = *obligation.self_ty().skip_binder(); let (closure_def_id, substs) = match self_ty.sty { ty::TyGenerator(id, substs, _) => (id, substs), |
