about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2016-03-15 08:23:23 -0400
committerNiko Matsakis <niko@alum.mit.edu>2016-05-31 19:12:35 -0400
commitaecce2ba6eba5fbadb2e5aaf9eb29a30acea086d (patch)
tree706a41f1fd36e73cbea3504e5d3b90f96ad5bb59 /src
parent298730e7032cd55809423773da397cd5c7d827d4 (diff)
downloadrust-aecce2ba6eba5fbadb2e5aaf9eb29a30acea086d.tar.gz
rust-aecce2ba6eba5fbadb2e5aaf9eb29a30acea086d.zip
add flag for ReSkolemized
Diffstat (limited to 'src')
-rw-r--r--src/librustc/ty/flags.rs6
-rw-r--r--src/librustc/ty/mod.rs13
2 files changed, 12 insertions, 7 deletions
diff --git a/src/librustc/ty/flags.rs b/src/librustc/ty/flags.rs
index a1da3017fcd..b12581b3400 100644
--- a/src/librustc/ty/flags.rs
+++ b/src/librustc/ty/flags.rs
@@ -176,9 +176,13 @@ impl FlagComputation {
 
     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); }
diff --git a/src/librustc/ty/mod.rs b/src/librustc/ty/mod.rs
index 24f0671ce61..b37fad0ba30 100644
--- a/src/librustc/ty/mod.rs
+++ b/src/librustc/ty/mod.rs
@@ -514,15 +514,16 @@ bitflags! {
         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.