@@ -523,101 +523,106 @@ bitflags! {
523523 // Does this have parameters? Used to determine whether substitution is
524524 // required.
525525 /// Does this have [Param]?
526- const HAS_TY_PARAM = 1 << 0 ;
526+ const HAS_TY_PARAM = 1 << 0 ;
527527 /// Does this have [ReEarlyBound]?
528- const HAS_RE_PARAM = 1 << 1 ;
528+ const HAS_RE_PARAM = 1 << 1 ;
529529 /// Does this have [ConstKind::Param]?
530- const HAS_CT_PARAM = 1 << 2 ;
530+ const HAS_CT_PARAM = 1 << 2 ;
531531
532- const NEEDS_SUBST = TypeFlags :: HAS_TY_PARAM . bits
533- | TypeFlags :: HAS_RE_PARAM . bits
534- | TypeFlags :: HAS_CT_PARAM . bits;
532+ const NEEDS_SUBST = TypeFlags :: HAS_TY_PARAM . bits
533+ | TypeFlags :: HAS_RE_PARAM . bits
534+ | TypeFlags :: HAS_CT_PARAM . bits;
535535
536536 /// Does this have [Infer]?
537- const HAS_TY_INFER = 1 << 3 ;
537+ const HAS_TY_INFER = 1 << 3 ;
538538 /// Does this have [ReVar]?
539- const HAS_RE_INFER = 1 << 4 ;
539+ const HAS_RE_INFER = 1 << 4 ;
540540 /// Does this have [ConstKind::Infer]?
541- const HAS_CT_INFER = 1 << 5 ;
541+ const HAS_CT_INFER = 1 << 5 ;
542542
543543 /// Does this have inference variables? Used to determine whether
544544 /// inference is required.
545- const NEEDS_INFER = TypeFlags :: HAS_TY_INFER . bits
546- | TypeFlags :: HAS_RE_INFER . bits
547- | TypeFlags :: HAS_CT_INFER . bits;
545+ const NEEDS_INFER = TypeFlags :: HAS_TY_INFER . bits
546+ | TypeFlags :: HAS_RE_INFER . bits
547+ | TypeFlags :: HAS_CT_INFER . bits;
548548
549549 /// Does this have [Placeholder]?
550- const HAS_TY_PLACEHOLDER = 1 << 6 ;
550+ const HAS_TY_PLACEHOLDER = 1 << 6 ;
551551 /// Does this have [RePlaceholder]?
552- const HAS_RE_PLACEHOLDER = 1 << 7 ;
552+ const HAS_RE_PLACEHOLDER = 1 << 7 ;
553553 /// Does this have [ConstKind::Placeholder]?
554- const HAS_CT_PLACEHOLDER = 1 << 8 ;
554+ const HAS_CT_PLACEHOLDER = 1 << 8 ;
555555
556556 /// `true` if there are "names" of regions and so forth
557557 /// that are local to a particular fn/inferctxt
558- const HAS_FREE_LOCAL_REGIONS = 1 << 9 ;
558+ const HAS_FREE_LOCAL_REGIONS = 1 << 9 ;
559559
560560 /// `true` if there are "names" of types and regions and so forth
561561 /// that are local to a particular fn
562- const HAS_FREE_LOCAL_NAMES = TypeFlags :: HAS_TY_PARAM . bits
563- | TypeFlags :: HAS_CT_PARAM . bits
564- | TypeFlags :: HAS_TY_INFER . bits
565- | TypeFlags :: HAS_CT_INFER . bits
566- | TypeFlags :: HAS_TY_PLACEHOLDER . bits
567- | TypeFlags :: HAS_CT_PLACEHOLDER . bits
568- | TypeFlags :: HAS_FREE_LOCAL_REGIONS . bits;
562+ const HAS_FREE_LOCAL_NAMES = TypeFlags :: HAS_TY_PARAM . bits
563+ | TypeFlags :: HAS_CT_PARAM . bits
564+ | TypeFlags :: HAS_TY_INFER . bits
565+ | TypeFlags :: HAS_CT_INFER . bits
566+ | TypeFlags :: HAS_TY_PLACEHOLDER . bits
567+ | TypeFlags :: HAS_CT_PLACEHOLDER . bits
568+ | TypeFlags :: HAS_FREE_LOCAL_REGIONS . bits;
569569
570570 /// Does this have [Projection] or [UnnormalizedProjection]?
571- const HAS_TY_PROJECTION = 1 << 10 ;
571+ const HAS_TY_PROJECTION = 1 << 10 ;
572572 /// Does this have [Opaque]?
573- const HAS_TY_OPAQUE = 1 << 11 ;
573+ const HAS_TY_OPAQUE = 1 << 11 ;
574574 /// Does this have [ConstKind::Unevaluated]?
575- const HAS_CT_PROJECTION = 1 << 12 ;
575+ const HAS_CT_PROJECTION = 1 << 12 ;
576576
577577 /// Could this type be normalized further?
578- const HAS_PROJECTION = TypeFlags :: HAS_TY_PROJECTION . bits
579- | TypeFlags :: HAS_TY_OPAQUE . bits
580- | TypeFlags :: HAS_CT_PROJECTION . bits;
578+ const HAS_PROJECTION = TypeFlags :: HAS_TY_PROJECTION . bits
579+ | TypeFlags :: HAS_TY_OPAQUE . bits
580+ | TypeFlags :: HAS_CT_PROJECTION . bits;
581581
582582 /// Present if the type belongs in a local type context.
583583 /// Set for placeholders and inference variables that are not "Fresh".
584- const KEEP_IN_LOCAL_TCX = 1 << 13 ;
584+ const KEEP_IN_LOCAL_TCX = 1 << 13 ;
585585
586586 /// Is an error type reachable?
587- const HAS_TY_ERR = 1 << 14 ;
587+ const HAS_TY_ERR = 1 << 14 ;
588588
589589 /// Does this have any region that "appears free" in the type?
590590 /// Basically anything but [ReLateBound] and [ReErased].
591- const HAS_FREE_REGIONS = 1 << 15 ;
591+ const HAS_FREE_REGIONS = 1 << 15 ;
592592
593593 /// Does this have any [ReLateBound] regions? Used to check
594594 /// if a global bound is safe to evaluate.
595- const HAS_RE_LATE_BOUND = 1 << 16 ;
595+ const HAS_RE_LATE_BOUND = 1 << 16 ;
596596
597597 /// Does this have any [ReErased] regions?
598- const HAS_RE_ERASED = 1 << 17 ;
598+ const HAS_RE_ERASED = 1 << 17 ;
599+
600+ /// Does this value have parameters/placeholders/inference variables which could be
601+ /// replaced later, in a way that would change the results of `impl` specialization?
602+ const STILL_FURTHER_SPECIALIZABLE = 1 << 18 ;
599603
600604 /// Flags representing the nominal content of a type,
601605 /// computed by FlagsComputation. If you add a new nominal
602606 /// flag, it should be added here too.
603- const NOMINAL_FLAGS = TypeFlags :: HAS_TY_PARAM . bits
604- | TypeFlags :: HAS_RE_PARAM . bits
605- | TypeFlags :: HAS_CT_PARAM . bits
606- | TypeFlags :: HAS_TY_INFER . bits
607- | TypeFlags :: HAS_RE_INFER . bits
608- | TypeFlags :: HAS_CT_INFER . bits
609- | TypeFlags :: HAS_TY_PLACEHOLDER . bits
610- | TypeFlags :: HAS_RE_PLACEHOLDER . bits
611- | TypeFlags :: HAS_CT_PLACEHOLDER . bits
612- | TypeFlags :: HAS_FREE_LOCAL_REGIONS . bits
613- | TypeFlags :: HAS_TY_PROJECTION . bits
614- | TypeFlags :: HAS_TY_OPAQUE . bits
615- | TypeFlags :: HAS_CT_PROJECTION . bits
616- | TypeFlags :: KEEP_IN_LOCAL_TCX . bits
617- | TypeFlags :: HAS_TY_ERR . bits
618- | TypeFlags :: HAS_FREE_REGIONS . bits
619- | TypeFlags :: HAS_RE_LATE_BOUND . bits
620- | TypeFlags :: HAS_RE_ERASED . bits;
607+ const NOMINAL_FLAGS = TypeFlags :: HAS_TY_PARAM . bits
608+ | TypeFlags :: HAS_RE_PARAM . bits
609+ | TypeFlags :: HAS_CT_PARAM . bits
610+ | TypeFlags :: HAS_TY_INFER . bits
611+ | TypeFlags :: HAS_RE_INFER . bits
612+ | TypeFlags :: HAS_CT_INFER . bits
613+ | TypeFlags :: HAS_TY_PLACEHOLDER . bits
614+ | TypeFlags :: HAS_RE_PLACEHOLDER . bits
615+ | TypeFlags :: HAS_CT_PLACEHOLDER . bits
616+ | TypeFlags :: HAS_FREE_LOCAL_REGIONS . bits
617+ | TypeFlags :: HAS_TY_PROJECTION . bits
618+ | TypeFlags :: HAS_TY_OPAQUE . bits
619+ | TypeFlags :: HAS_CT_PROJECTION . bits
620+ | TypeFlags :: KEEP_IN_LOCAL_TCX . bits
621+ | TypeFlags :: HAS_TY_ERR . bits
622+ | TypeFlags :: HAS_FREE_REGIONS . bits
623+ | TypeFlags :: HAS_RE_LATE_BOUND . bits
624+ | TypeFlags :: HAS_RE_ERASED . bits
625+ | TypeFlags :: STILL_FURTHER_SPECIALIZABLE . bits;
621626 }
622627}
623628
0 commit comments