Skip to content
/ rust Public
forked from rust-lang/rust

Commit 2302977

Browse files
authored
Rollup merge of rust-lang#158495 - Shourya742:2026-06-27-rename-tflag, r=BoxyUwU,khyperia
Rename HAS_CT_PROJECTION to HAS_CONST_ALIAS follow up: rust-lang#158115 (comment) r? @BoxyUwU
2 parents b48dc8e + e3e20ed commit 2302977

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

compiler/rustc_lint/src/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,7 @@ impl<'tcx> LateLintPass<'tcx> for TypeAliasBounds {
13251325
// FIXME(generic_const_exprs): Revisit this before stabilization.
13261326
// See also `tests/ui/const-generics/generic_const_exprs/type-alias-bounds.rs`.
13271327
let ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip();
1328-
if ty.has_type_flags(ty::TypeFlags::HAS_CT_PROJECTION)
1328+
if ty.has_type_flags(ty::TypeFlags::HAS_CONST_ALIAS)
13291329
&& cx.tcx.features().generic_const_exprs()
13301330
{
13311331
return;

compiler/rustc_middle/src/ty/abstract_const.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl<'tcx> TyCtxt<'tcx> {
4444
self.tcx
4545
}
4646
fn fold_ty(&mut self, ty: Ty<'tcx>) -> Ty<'tcx> {
47-
if ty.has_type_flags(ty::TypeFlags::HAS_CT_PROJECTION) {
47+
if ty.has_type_flags(ty::TypeFlags::HAS_CONST_ALIAS) {
4848
ty.super_fold_with(self)
4949
} else {
5050
ty

compiler/rustc_mir_transform/src/impossible_predicates.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub(crate) fn has_impossible_predicates(tcx: TyCtxt<'_>, def_id: DefId) -> bool
4545
// Only consider global clauses to simplify.
4646
TypeFlags::HAS_FREE_LOCAL_NAMES
4747
// Clauses that refer to alias constants as they cause cycles.
48-
| TypeFlags::HAS_CT_PROJECTION,
48+
| TypeFlags::HAS_CONST_ALIAS,
4949
)
5050
});
5151
let predicates: Vec<_> = traits::elaborate(tcx, predicates).collect();

compiler/rustc_trait_selection/src/traits/query/normalize.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ impl<'a, 'tcx> QueryNormalizer<'a, 'tcx> {
376376
// of type/const and we need to continue folding it to reveal the TAIT behind it
377377
// or further normalize nested alias consts.
378378
if res != term.to_term(tcx, ty::IsRigid::No)
379-
&& (res.has_type_flags(ty::TypeFlags::HAS_CT_PROJECTION)
379+
&& (res.has_type_flags(ty::TypeFlags::HAS_CONST_ALIAS)
380380
|| matches!(
381381
term.kind,
382382
ty::AliasTermKind::FreeTy { .. } | ty::AliasTermKind::FreeConst { .. }

compiler/rustc_type_ir/src/flags.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ bitflags::bitflags! {
8080
/// Does this have `Inherent`?
8181
const HAS_TY_INHERENT = 1 << 13;
8282
/// Does this have `ConstKind::Alias`?
83-
const HAS_CT_PROJECTION = 1 << 14;
83+
const HAS_CONST_ALIAS = 1 << 14;
8484

8585
/// Does this have `Alias` or `ConstKind::Alias`?
8686
///
@@ -89,7 +89,7 @@ bitflags::bitflags! {
8989
| TypeFlags::HAS_TY_FREE_ALIAS.bits()
9090
| TypeFlags::HAS_TY_OPAQUE.bits()
9191
| TypeFlags::HAS_TY_INHERENT.bits()
92-
| TypeFlags::HAS_CT_PROJECTION.bits();
92+
| TypeFlags::HAS_CONST_ALIAS.bits();
9393

9494
/// Is a type or const error reachable?
9595
const HAS_NON_REGION_ERROR = 1 << 15;
@@ -476,7 +476,7 @@ impl<I: Interner> FlagComputation<I> {
476476
ty::ConstKind::Alias(is_rigid, alias_const) => {
477477
self.add_is_rigid(is_rigid);
478478
self.add_args(alias_const.args.as_slice());
479-
self.add_flags(TypeFlags::HAS_CT_PROJECTION);
479+
self.add_flags(TypeFlags::HAS_CONST_ALIAS);
480480
}
481481
ty::ConstKind::Infer(infer) => match infer {
482482
ty::InferConst::Fresh(_) => self.add_flags(TypeFlags::HAS_CT_FRESH),

0 commit comments

Comments
 (0)