@@ -523,101 +523,106 @@ bitflags! {
523
523
// Does this have parameters? Used to determine whether substitution is
524
524
// required.
525
525
/// Does this have [Param]?
526
- const HAS_TY_PARAM = 1 << 0 ;
526
+ const HAS_TY_PARAM = 1 << 0 ;
527
527
/// Does this have [ReEarlyBound]?
528
- const HAS_RE_PARAM = 1 << 1 ;
528
+ const HAS_RE_PARAM = 1 << 1 ;
529
529
/// Does this have [ConstKind::Param]?
530
- const HAS_CT_PARAM = 1 << 2 ;
530
+ const HAS_CT_PARAM = 1 << 2 ;
531
531
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;
535
535
536
536
/// Does this have [Infer]?
537
- const HAS_TY_INFER = 1 << 3 ;
537
+ const HAS_TY_INFER = 1 << 3 ;
538
538
/// Does this have [ReVar]?
539
- const HAS_RE_INFER = 1 << 4 ;
539
+ const HAS_RE_INFER = 1 << 4 ;
540
540
/// Does this have [ConstKind::Infer]?
541
- const HAS_CT_INFER = 1 << 5 ;
541
+ const HAS_CT_INFER = 1 << 5 ;
542
542
543
543
/// Does this have inference variables? Used to determine whether
544
544
/// 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;
548
548
549
549
/// Does this have [Placeholder]?
550
- const HAS_TY_PLACEHOLDER = 1 << 6 ;
550
+ const HAS_TY_PLACEHOLDER = 1 << 6 ;
551
551
/// Does this have [RePlaceholder]?
552
- const HAS_RE_PLACEHOLDER = 1 << 7 ;
552
+ const HAS_RE_PLACEHOLDER = 1 << 7 ;
553
553
/// Does this have [ConstKind::Placeholder]?
554
- const HAS_CT_PLACEHOLDER = 1 << 8 ;
554
+ const HAS_CT_PLACEHOLDER = 1 << 8 ;
555
555
556
556
/// `true` if there are "names" of regions and so forth
557
557
/// that are local to a particular fn/inferctxt
558
- const HAS_FREE_LOCAL_REGIONS = 1 << 9 ;
558
+ const HAS_FREE_LOCAL_REGIONS = 1 << 9 ;
559
559
560
560
/// `true` if there are "names" of types and regions and so forth
561
561
/// 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;
569
569
570
570
/// Does this have [Projection] or [UnnormalizedProjection]?
571
- const HAS_TY_PROJECTION = 1 << 10 ;
571
+ const HAS_TY_PROJECTION = 1 << 10 ;
572
572
/// Does this have [Opaque]?
573
- const HAS_TY_OPAQUE = 1 << 11 ;
573
+ const HAS_TY_OPAQUE = 1 << 11 ;
574
574
/// Does this have [ConstKind::Unevaluated]?
575
- const HAS_CT_PROJECTION = 1 << 12 ;
575
+ const HAS_CT_PROJECTION = 1 << 12 ;
576
576
577
577
/// 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;
581
581
582
582
/// Present if the type belongs in a local type context.
583
583
/// 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 ;
585
585
586
586
/// Is an error type reachable?
587
- const HAS_TY_ERR = 1 << 14 ;
587
+ const HAS_TY_ERR = 1 << 14 ;
588
588
589
589
/// Does this have any region that "appears free" in the type?
590
590
/// Basically anything but [ReLateBound] and [ReErased].
591
- const HAS_FREE_REGIONS = 1 << 15 ;
591
+ const HAS_FREE_REGIONS = 1 << 15 ;
592
592
593
593
/// Does this have any [ReLateBound] regions? Used to check
594
594
/// if a global bound is safe to evaluate.
595
- const HAS_RE_LATE_BOUND = 1 << 16 ;
595
+ const HAS_RE_LATE_BOUND = 1 << 16 ;
596
596
597
597
/// 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 ;
599
603
600
604
/// Flags representing the nominal content of a type,
601
605
/// computed by FlagsComputation. If you add a new nominal
602
606
/// 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;
621
626
}
622
627
}
623
628
0 commit comments