Skip to content

Commit aecce2b

Browse files
committed
add flag for ReSkolemized
1 parent 298730e commit aecce2b

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

src/librustc/ty/flags.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,13 @@ impl FlagComputation {
176176

177177
fn add_region(&mut self, r: ty::Region) {
178178
match r {
179-
ty::ReVar(..) |
179+
ty::ReVar(..) => {
180+
self.add_flags(TypeFlags::HAS_RE_INFER);
181+
self.add_flags(TypeFlags::KEEP_IN_LOCAL_TCX);
182+
}
180183
ty::ReSkolemized(..) => {
181184
self.add_flags(TypeFlags::HAS_RE_INFER);
185+
self.add_flags(TypeFlags::HAS_RE_SKOL);
182186
self.add_flags(TypeFlags::KEEP_IN_LOCAL_TCX);
183187
}
184188
ty::ReLateBound(debruijn, _) => { self.add_depth(debruijn.depth); }

src/librustc/ty/mod.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -514,15 +514,16 @@ bitflags! {
514514
const HAS_SELF = 1 << 1,
515515
const HAS_TY_INFER = 1 << 2,
516516
const HAS_RE_INFER = 1 << 3,
517-
const HAS_RE_EARLY_BOUND = 1 << 4,
518-
const HAS_FREE_REGIONS = 1 << 5,
519-
const HAS_TY_ERR = 1 << 6,
520-
const HAS_PROJECTION = 1 << 7,
521-
const HAS_TY_CLOSURE = 1 << 8,
517+
const HAS_RE_SKOL = 1 << 4,
518+
const HAS_RE_EARLY_BOUND = 1 << 5,
519+
const HAS_FREE_REGIONS = 1 << 6,
520+
const HAS_TY_ERR = 1 << 7,
521+
const HAS_PROJECTION = 1 << 8,
522+
const HAS_TY_CLOSURE = 1 << 9,
522523

523524
// true if there are "names" of types and regions and so forth
524525
// that are local to a particular fn
525-
const HAS_LOCAL_NAMES = 1 << 9,
526+
const HAS_LOCAL_NAMES = 1 << 10,
526527

527528
// Present if the type belongs in a local type context.
528529
// Only set for TyInfer other than Fresh.

0 commit comments

Comments
 (0)