1
Fork 0

update type flags

- `HAS_RE_LATE_BOUND` -> `HAS_RE_BOUND`
- `HAS_TY_LATE_BOUND` -> `HAS_TY_BOUND`
- `HAS_CT_LATE_BOUND` -> `HAS_CT_BOUND`
- `HAS_LATE_BOUND` -> `HAS_BOUND_VARS`
- `fn has_late_bound_regions` -> `fn has_bound_regions`
- `fnhas_non_region_late_bound` -> `fn has_non_region_bound_vars`
- `fn has_late_bound_vars` -> `fn has_bound_vars`
This commit is contained in:
lcnr 2023-11-13 14:12:56 +00:00
parent dd0739aabe
commit 8935a1be01
11 changed files with 25 additions and 25 deletions

View file

@ -137,7 +137,7 @@ impl FlagComputation {
&ty::Bound(debruijn, _) => {
self.add_bound_var(debruijn);
self.add_flags(TypeFlags::HAS_TY_LATE_BOUND);
self.add_flags(TypeFlags::HAS_TY_BOUND);
}
&ty::Placeholder(..) => {
@ -317,7 +317,7 @@ impl FlagComputation {
}
ty::ConstKind::Bound(debruijn, _) => {
self.add_bound_var(debruijn);
self.add_flags(TypeFlags::HAS_CT_LATE_BOUND);
self.add_flags(TypeFlags::HAS_CT_BOUND);
}
ty::ConstKind::Param(_) => {
self.add_flags(TypeFlags::HAS_CT_PARAM);

View file

@ -1815,7 +1815,7 @@ impl<'tcx> Region<'tcx> {
flags = flags | TypeFlags::HAS_FREE_REGIONS;
}
ty::ReBound(..) => {
flags = flags | TypeFlags::HAS_RE_LATE_BOUND;
flags = flags | TypeFlags::HAS_RE_BOUND;
}
ty::ReErased => {
flags = flags | TypeFlags::HAS_RE_ERASED;

View file

@ -111,16 +111,16 @@ pub trait TypeVisitableExt<'tcx>: TypeVisitable<TyCtxt<'tcx>> {
}
/// True if there are any late-bound regions
fn has_late_bound_regions(&self) -> bool {
self.has_type_flags(TypeFlags::HAS_RE_LATE_BOUND)
fn has_bound_regions(&self) -> bool {
self.has_type_flags(TypeFlags::HAS_RE_BOUND)
}
/// True if there are any late-bound non-region variables
fn has_non_region_late_bound(&self) -> bool {
self.has_type_flags(TypeFlags::HAS_LATE_BOUND - TypeFlags::HAS_RE_LATE_BOUND)
fn has_non_region_bound_vars(&self) -> bool {
self.has_type_flags(TypeFlags::HAS_BOUND_VARS - TypeFlags::HAS_RE_BOUND)
}
/// True if there are any late-bound variables
fn has_late_bound_vars(&self) -> bool {
self.has_type_flags(TypeFlags::HAS_LATE_BOUND)
/// True if there are any bound variables
fn has_bound_vars(&self) -> bool {
self.has_type_flags(TypeFlags::HAS_BOUND_VARS)
}
/// Indicates whether this value still has parameters/placeholders/inference variables