]> git.lizzy.rs Git - rust.git/commitdiff
Copy a comment
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>
Thu, 13 Jul 2017 00:32:36 +0000 (02:32 +0200)
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>
Fri, 28 Jul 2017 13:46:24 +0000 (15:46 +0200)
src/librustc/traits/select.rs

index 3fcd79f706b789c7621cd87b09e61963f0c027f4..9d5494d1fbab638663ecceb90bc9cb93ac7c50cc 100644 (file)
@@ -1500,6 +1500,9 @@ fn assemble_generator_candidates(&mut self,
             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),