Skip to content

Commit 49c6281

Browse files
committed
add flag for ReSkolemized
1 parent c87e798 commit 49c6281

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

src/librustc/ty/flags.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,13 @@ impl FlagComputation {
170170

171171
fn add_region(&mut self, r: ty::Region) {
172172
match r {
173-
ty::ReVar(..) |
174-
ty::ReSkolemized(..) => { self.add_flags(TypeFlags::HAS_RE_INFER); }
173+
ty::ReVar(..) => {
174+
self.add_flags(TypeFlags::HAS_RE_INFER);
175+
}
176+
ty::ReSkolemized(..) => {
177+
self.add_flags(TypeFlags::HAS_RE_INFER);
178+
self.add_flags(TypeFlags::HAS_RE_SKOL);
179+
}
175180
ty::ReLateBound(debruijn, _) => { self.add_depth(debruijn.depth); }
176181
ty::ReEarlyBound(..) => { self.add_flags(TypeFlags::HAS_RE_EARLY_BOUND); }
177182
ty::ReStatic => {}

src/librustc/ty/mod.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -475,15 +475,16 @@ bitflags! {
475475
const HAS_SELF = 1 << 1,
476476
const HAS_TY_INFER = 1 << 2,
477477
const HAS_RE_INFER = 1 << 3,
478-
const HAS_RE_EARLY_BOUND = 1 << 4,
479-
const HAS_FREE_REGIONS = 1 << 5,
480-
const HAS_TY_ERR = 1 << 6,
481-
const HAS_PROJECTION = 1 << 7,
482-
const HAS_TY_CLOSURE = 1 << 8,
478+
const HAS_RE_SKOL = 1 << 4,
479+
const HAS_RE_EARLY_BOUND = 1 << 5,
480+
const HAS_FREE_REGIONS = 1 << 6,
481+
const HAS_TY_ERR = 1 << 7,
482+
const HAS_PROJECTION = 1 << 8,
483+
const HAS_TY_CLOSURE = 1 << 9,
483484

484485
// true if there are "names" of types and regions and so forth
485486
// that are local to a particular fn
486-
const HAS_LOCAL_NAMES = 1 << 9,
487+
const HAS_LOCAL_NAMES = 1 << 10,
487488

488489
const NEEDS_SUBST = TypeFlags::HAS_PARAMS.bits |
489490
TypeFlags::HAS_SELF.bits |

0 commit comments

Comments
 (0)