Rename some occurences of skol
to placeholder
This commit is contained in:
parent
05995a8522
commit
da3def3ebf
7 changed files with 14 additions and 14 deletions
|
@ -424,7 +424,7 @@ impl<'a, 'b, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for AssociatedTypeNormalizer<'a,
|
|||
if let ConstValue::Unevaluated(def_id, substs) = constant.val {
|
||||
let tcx = self.selcx.tcx().global_tcx();
|
||||
if let Some(param_env) = self.tcx().lift_to_global(&self.param_env) {
|
||||
if substs.needs_infer() || substs.has_skol() {
|
||||
if substs.needs_infer() || substs.has_placeholders() {
|
||||
let identity_substs = Substs::identity_for_item(tcx, def_id);
|
||||
let instance = ty::Instance::resolve(tcx, param_env, def_id, identity_substs);
|
||||
if let Some(instance) = instance {
|
||||
|
@ -1656,7 +1656,7 @@ impl<'tcx> ProjectionCache<'tcx> {
|
|||
}
|
||||
|
||||
pub fn rollback_placeholder(&mut self, snapshot: &ProjectionCacheSnapshot) {
|
||||
self.map.partial_rollback(&snapshot.snapshot, &|k| k.ty.has_re_skol());
|
||||
self.map.partial_rollback(&snapshot.snapshot, &|k| k.ty.has_re_placeholders());
|
||||
}
|
||||
|
||||
pub fn commit(&mut self, snapshot: &ProjectionCacheSnapshot) {
|
||||
|
|
|
@ -202,7 +202,7 @@ impl<'cx, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for QueryNormalizer<'cx, 'gcx, 'tcx
|
|||
if let ConstValue::Unevaluated(def_id, substs) = constant.val {
|
||||
let tcx = self.infcx.tcx.global_tcx();
|
||||
if let Some(param_env) = self.tcx().lift_to_global(&self.param_env) {
|
||||
if substs.needs_infer() || substs.has_skol() {
|
||||
if substs.needs_infer() || substs.has_placeholders() {
|
||||
let identity_substs = Substs::identity_for_item(tcx, def_id);
|
||||
let instance = ty::Instance::resolve(tcx, param_env, def_id, identity_substs);
|
||||
if let Some(instance) = instance {
|
||||
|
|
|
@ -102,14 +102,14 @@ pub trait TypeFoldable<'tcx>: fmt::Debug + Clone {
|
|||
fn needs_infer(&self) -> bool {
|
||||
self.has_type_flags(TypeFlags::HAS_TY_INFER | TypeFlags::HAS_RE_INFER)
|
||||
}
|
||||
fn has_skol(&self) -> bool {
|
||||
self.has_type_flags(TypeFlags::HAS_RE_SKOL)
|
||||
fn has_placeholders(&self) -> bool {
|
||||
self.has_type_flags(TypeFlags::HAS_RE_PLACEHOLDER)
|
||||
}
|
||||
fn needs_subst(&self) -> bool {
|
||||
self.has_type_flags(TypeFlags::NEEDS_SUBST)
|
||||
}
|
||||
fn has_re_skol(&self) -> bool {
|
||||
self.has_type_flags(TypeFlags::HAS_RE_SKOL)
|
||||
fn has_re_placeholders(&self) -> bool {
|
||||
self.has_type_flags(TypeFlags::HAS_RE_PLACEHOLDER)
|
||||
}
|
||||
fn has_closure_types(&self) -> bool {
|
||||
self.has_type_flags(TypeFlags::HAS_TY_CLOSURE)
|
||||
|
|
|
@ -432,7 +432,7 @@ bitflags! {
|
|||
const HAS_SELF = 1 << 1;
|
||||
const HAS_TY_INFER = 1 << 2;
|
||||
const HAS_RE_INFER = 1 << 3;
|
||||
const HAS_RE_SKOL = 1 << 4;
|
||||
const HAS_RE_PLACEHOLDER = 1 << 4;
|
||||
|
||||
/// Does this have any `ReEarlyBound` regions? Used to
|
||||
/// determine whether substitition is required, since those
|
||||
|
@ -478,7 +478,7 @@ bitflags! {
|
|||
TypeFlags::HAS_SELF.bits |
|
||||
TypeFlags::HAS_TY_INFER.bits |
|
||||
TypeFlags::HAS_RE_INFER.bits |
|
||||
TypeFlags::HAS_RE_SKOL.bits |
|
||||
TypeFlags::HAS_RE_PLACEHOLDER.bits |
|
||||
TypeFlags::HAS_RE_EARLY_BOUND.bits |
|
||||
TypeFlags::HAS_FREE_REGIONS.bits |
|
||||
TypeFlags::HAS_TY_ERR.bits |
|
||||
|
@ -1689,7 +1689,7 @@ impl<'tcx> ParamEnv<'tcx> {
|
|||
}
|
||||
|
||||
Reveal::All => {
|
||||
if value.has_skol()
|
||||
if value.has_placeholders()
|
||||
|| value.needs_infer()
|
||||
|| value.has_param_types()
|
||||
|| value.has_self_ty()
|
||||
|
|
|
@ -1465,7 +1465,7 @@ impl RegionKind {
|
|||
}
|
||||
ty::RePlaceholder(..) => {
|
||||
flags = flags | TypeFlags::HAS_FREE_REGIONS;
|
||||
flags = flags | TypeFlags::HAS_RE_SKOL;
|
||||
flags = flags | TypeFlags::HAS_RE_PLACEHOLDER;
|
||||
}
|
||||
ty::ReLateBound(..) => {
|
||||
flags = flags | TypeFlags::HAS_RE_LATE_BOUND;
|
||||
|
|
|
@ -1494,7 +1494,7 @@ impl<'tcx> Candidate<'tcx> {
|
|||
// `WhereClausePick`.
|
||||
assert!(
|
||||
!trait_ref.skip_binder().substs.needs_infer()
|
||||
&& !trait_ref.skip_binder().substs.has_skol()
|
||||
&& !trait_ref.skip_binder().substs.has_placeholders()
|
||||
);
|
||||
|
||||
WhereClausePick(trait_ref.clone())
|
||||
|
|
|
@ -115,7 +115,7 @@ impl<'cx, 'gcx, 'tcx> WritebackCx<'cx, 'gcx, 'tcx> {
|
|||
|
||||
fn write_ty_to_tables(&mut self, hir_id: hir::HirId, ty: Ty<'gcx>) {
|
||||
debug!("write_ty_to_tables({:?}, {:?})", hir_id, ty);
|
||||
assert!(!ty.needs_infer() && !ty.has_skol());
|
||||
assert!(!ty.needs_infer() && !ty.has_placeholders());
|
||||
self.tables.node_types_mut().insert(hir_id, ty);
|
||||
}
|
||||
|
||||
|
@ -580,7 +580,7 @@ impl<'cx, 'gcx, 'tcx> WritebackCx<'cx, 'gcx, 'tcx> {
|
|||
if let Some(substs) = self.fcx.tables.borrow().node_substs_opt(hir_id) {
|
||||
let substs = self.resolve(&substs, &span);
|
||||
debug!("write_substs_to_tcx({:?}, {:?})", hir_id, substs);
|
||||
assert!(!substs.needs_infer() && !substs.has_skol());
|
||||
assert!(!substs.needs_infer() && !substs.has_placeholders());
|
||||
self.tables.node_substs_mut().insert(hir_id, substs);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue