Skip to content

Commit 4fefd64

Browse files
committed
Rename some occurences of skol to placeholder
1 parent 669cf7b commit 4fefd64

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

src/librustc/traits/project.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ impl<'a, 'b, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for AssociatedTypeNormalizer<'a,
424424
if let ConstValue::Unevaluated(def_id, substs) = constant.val {
425425
let tcx = self.selcx.tcx().global_tcx();
426426
if let Some(param_env) = self.tcx().lift_to_global(&self.param_env) {
427-
if substs.needs_infer() || substs.has_skol() {
427+
if substs.needs_infer() || substs.has_placeholders() {
428428
let identity_substs = Substs::identity_for_item(tcx, def_id);
429429
let instance = ty::Instance::resolve(tcx, param_env, def_id, identity_substs);
430430
if let Some(instance) = instance {
@@ -1656,7 +1656,7 @@ impl<'tcx> ProjectionCache<'tcx> {
16561656
}
16571657

16581658
pub fn rollback_placeholder(&mut self, snapshot: &ProjectionCacheSnapshot) {
1659-
self.map.partial_rollback(&snapshot.snapshot, &|k| k.ty.has_re_skol());
1659+
self.map.partial_rollback(&snapshot.snapshot, &|k| k.ty.has_re_placeholders());
16601660
}
16611661

16621662
pub fn commit(&mut self, snapshot: &ProjectionCacheSnapshot) {

src/librustc/traits/query/normalize.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ impl<'cx, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for QueryNormalizer<'cx, 'gcx, 'tcx
202202
if let ConstValue::Unevaluated(def_id, substs) = constant.val {
203203
let tcx = self.infcx.tcx.global_tcx();
204204
if let Some(param_env) = self.tcx().lift_to_global(&self.param_env) {
205-
if substs.needs_infer() || substs.has_skol() {
205+
if substs.needs_infer() || substs.has_placeholders() {
206206
let identity_substs = Substs::identity_for_item(tcx, def_id);
207207
let instance = ty::Instance::resolve(tcx, param_env, def_id, identity_substs);
208208
if let Some(instance) = instance {

src/librustc/ty/fold.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@ pub trait TypeFoldable<'tcx>: fmt::Debug + Clone {
102102
fn needs_infer(&self) -> bool {
103103
self.has_type_flags(TypeFlags::HAS_TY_INFER | TypeFlags::HAS_RE_INFER)
104104
}
105-
fn has_skol(&self) -> bool {
106-
self.has_type_flags(TypeFlags::HAS_RE_SKOL)
105+
fn has_placeholders(&self) -> bool {
106+
self.has_type_flags(TypeFlags::HAS_RE_PLACEHOLDER)
107107
}
108108
fn needs_subst(&self) -> bool {
109109
self.has_type_flags(TypeFlags::NEEDS_SUBST)
110110
}
111-
fn has_re_skol(&self) -> bool {
112-
self.has_type_flags(TypeFlags::HAS_RE_SKOL)
111+
fn has_re_placeholders(&self) -> bool {
112+
self.has_type_flags(TypeFlags::HAS_RE_PLACEHOLDER)
113113
}
114114
fn has_closure_types(&self) -> bool {
115115
self.has_type_flags(TypeFlags::HAS_TY_CLOSURE)

src/librustc/ty/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ bitflags! {
433433
const HAS_SELF = 1 << 1;
434434
const HAS_TY_INFER = 1 << 2;
435435
const HAS_RE_INFER = 1 << 3;
436-
const HAS_RE_SKOL = 1 << 4;
436+
const HAS_RE_PLACEHOLDER = 1 << 4;
437437

438438
/// Does this have any `ReEarlyBound` regions? Used to
439439
/// determine whether substitition is required, since those
@@ -479,7 +479,7 @@ bitflags! {
479479
TypeFlags::HAS_SELF.bits |
480480
TypeFlags::HAS_TY_INFER.bits |
481481
TypeFlags::HAS_RE_INFER.bits |
482-
TypeFlags::HAS_RE_SKOL.bits |
482+
TypeFlags::HAS_RE_PLACEHOLDER.bits |
483483
TypeFlags::HAS_RE_EARLY_BOUND.bits |
484484
TypeFlags::HAS_FREE_REGIONS.bits |
485485
TypeFlags::HAS_TY_ERR.bits |
@@ -1646,7 +1646,7 @@ impl<'tcx> ParamEnv<'tcx> {
16461646
}
16471647

16481648
Reveal::All => {
1649-
if value.has_skol()
1649+
if value.has_placeholders()
16501650
|| value.needs_infer()
16511651
|| value.has_param_types()
16521652
|| value.has_self_ty()

src/librustc/ty/sty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1465,7 +1465,7 @@ impl RegionKind {
14651465
}
14661466
ty::RePlaceholder(..) => {
14671467
flags = flags | TypeFlags::HAS_FREE_REGIONS;
1468-
flags = flags | TypeFlags::HAS_RE_SKOL;
1468+
flags = flags | TypeFlags::HAS_RE_PLACEHOLDER;
14691469
}
14701470
ty::ReLateBound(..) => {
14711471
flags = flags | TypeFlags::HAS_RE_LATE_BOUND;

src/librustc_typeck/check/method/probe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1494,7 +1494,7 @@ impl<'tcx> Candidate<'tcx> {
14941494
// `WhereClausePick`.
14951495
assert!(
14961496
!trait_ref.skip_binder().substs.needs_infer()
1497-
&& !trait_ref.skip_binder().substs.has_skol()
1497+
&& !trait_ref.skip_binder().substs.has_placeholders()
14981498
);
14991499

15001500
WhereClausePick(trait_ref.clone())

src/librustc_typeck/check/writeback.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ impl<'cx, 'gcx, 'tcx> WritebackCx<'cx, 'gcx, 'tcx> {
115115

116116
fn write_ty_to_tables(&mut self, hir_id: hir::HirId, ty: Ty<'gcx>) {
117117
debug!("write_ty_to_tables({:?}, {:?})", hir_id, ty);
118-
assert!(!ty.needs_infer() && !ty.has_skol());
118+
assert!(!ty.needs_infer() && !ty.has_placeholders());
119119
self.tables.node_types_mut().insert(hir_id, ty);
120120
}
121121

@@ -580,7 +580,7 @@ impl<'cx, 'gcx, 'tcx> WritebackCx<'cx, 'gcx, 'tcx> {
580580
if let Some(substs) = self.fcx.tables.borrow().node_substs_opt(hir_id) {
581581
let substs = self.resolve(&substs, &span);
582582
debug!("write_substs_to_tcx({:?}, {:?})", hir_id, substs);
583-
assert!(!substs.needs_infer() && !substs.has_skol());
583+
assert!(!substs.needs_infer() && !substs.has_placeholders());
584584
self.tables.node_substs_mut().insert(hir_id, substs);
585585
}
586586

0 commit comments

Comments
 (0)