]> git.lizzy.rs Git - rust.git/commitdiff
add flag for ReSkolemized
authorNiko Matsakis <niko@alum.mit.edu>
Tue, 15 Mar 2016 12:23:23 +0000 (08:23 -0400)
committerNiko Matsakis <niko@alum.mit.edu>
Tue, 31 May 2016 23:12:35 +0000 (19:12 -0400)
src/librustc/ty/flags.rs
src/librustc/ty/mod.rs

index a1da3017fcd043f9eff961ab05be01da47777f51..b12581b34003d64841a6d5253171254fb0edba37 100644 (file)
@@ -176,9 +176,13 @@ fn add_fn_sig(&mut self, fn_sig: &ty::PolyFnSig) {
 
     fn add_region(&mut self, r: ty::Region) {
         match r {
-            ty::ReVar(..) |
+            ty::ReVar(..) => {
+                self.add_flags(TypeFlags::HAS_RE_INFER);
+                self.add_flags(TypeFlags::KEEP_IN_LOCAL_TCX);
+            }
             ty::ReSkolemized(..) => {
                 self.add_flags(TypeFlags::HAS_RE_INFER);
+                self.add_flags(TypeFlags::HAS_RE_SKOL);
                 self.add_flags(TypeFlags::KEEP_IN_LOCAL_TCX);
             }
             ty::ReLateBound(debruijn, _) => { self.add_depth(debruijn.depth); }
index 24f0671ce6184c2c03a396653ecb9a329df81421..b37fad0ba305f68a8e8fbfbc946dd31c24c4e67a 100644 (file)
@@ -514,15 +514,16 @@ pub enum FragmentInfo {
         const HAS_SELF           = 1 << 1,
         const HAS_TY_INFER       = 1 << 2,
         const HAS_RE_INFER       = 1 << 3,
-        const HAS_RE_EARLY_BOUND = 1 << 4,
-        const HAS_FREE_REGIONS   = 1 << 5,
-        const HAS_TY_ERR         = 1 << 6,
-        const HAS_PROJECTION     = 1 << 7,
-        const HAS_TY_CLOSURE     = 1 << 8,
+        const HAS_RE_SKOL        = 1 << 4,
+        const HAS_RE_EARLY_BOUND = 1 << 5,
+        const HAS_FREE_REGIONS   = 1 << 6,
+        const HAS_TY_ERR         = 1 << 7,
+        const HAS_PROJECTION     = 1 << 8,
+        const HAS_TY_CLOSURE     = 1 << 9,
 
         // true if there are "names" of types and regions and so forth
         // that are local to a particular fn
-        const HAS_LOCAL_NAMES   = 1 << 9,
+        const HAS_LOCAL_NAMES    = 1 << 10,
 
         // Present if the type belongs in a local type context.
         // Only set for TyInfer other than Fresh.