]> git.proxmox.com Git - rustc.git/blobdiff - src/librustc/ty/outlives.rs
New upstream version 1.25.0+dfsg1
[rustc.git] / src / librustc / ty / outlives.rs
index 707137649d771b01be64c9ee26d4daafcc74ee5f..ff99a4b7ff63828a17b5fd2d44cd4144e63b7428 100644 (file)
@@ -79,16 +79,19 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
                 }
             }
 
-            ty::TyGenerator(def_id, ref substs, ref interior) => {
+            ty::TyGenerator(def_id, ref substs, _) => {
                 // Same as the closure case
                 for upvar_ty in substs.upvar_tys(def_id, *self) {
                     self.compute_components(upvar_ty, out);
                 }
 
-                // But generators can have additional interior types
-                self.compute_components(interior.witness, out);
+                // We ignore regions in the generator interior as we don't
+                // want these to affect region inference
             }
 
+            // All regions are bound inside a witness
+            ty::TyGeneratorWitness(..) => (),
+
             // OutlivesTypeParameterEnv -- the actual checking that `X:'a`
             // is implied by the environment is done in regionck.
             ty::TyParam(p) => {