@@ -524,101 +524,106 @@ bitflags! {
524
524
// Does this have parameters? Used to determine whether substitution is
525
525
// required.
526
526
/// Does this have [Param]?
527
- const HAS_TY_PARAM = 1 << 0 ;
527
+ const HAS_TY_PARAM = 1 << 0 ;
528
528
/// Does this have [ReEarlyBound]?
529
- const HAS_RE_PARAM = 1 << 1 ;
529
+ const HAS_RE_PARAM = 1 << 1 ;
530
530
/// Does this have [ConstKind::Param]?
531
- const HAS_CT_PARAM = 1 << 2 ;
531
+ const HAS_CT_PARAM = 1 << 2 ;
532
532
533
- const NEEDS_SUBST = TypeFlags :: HAS_TY_PARAM . bits
534
- | TypeFlags :: HAS_RE_PARAM . bits
535
- | TypeFlags :: HAS_CT_PARAM . bits;
533
+ const NEEDS_SUBST = TypeFlags :: HAS_TY_PARAM . bits
534
+ | TypeFlags :: HAS_RE_PARAM . bits
535
+ | TypeFlags :: HAS_CT_PARAM . bits;
536
536
537
537
/// Does this have [Infer]?
538
- const HAS_TY_INFER = 1 << 3 ;
538
+ const HAS_TY_INFER = 1 << 3 ;
539
539
/// Does this have [ReVar]?
540
- const HAS_RE_INFER = 1 << 4 ;
540
+ const HAS_RE_INFER = 1 << 4 ;
541
541
/// Does this have [ConstKind::Infer]?
542
- const HAS_CT_INFER = 1 << 5 ;
542
+ const HAS_CT_INFER = 1 << 5 ;
543
543
544
544
/// Does this have inference variables? Used to determine whether
545
545
/// inference is required.
546
- const NEEDS_INFER = TypeFlags :: HAS_TY_INFER . bits
547
- | TypeFlags :: HAS_RE_INFER . bits
548
- | TypeFlags :: HAS_CT_INFER . bits;
546
+ const NEEDS_INFER = TypeFlags :: HAS_TY_INFER . bits
547
+ | TypeFlags :: HAS_RE_INFER . bits
548
+ | TypeFlags :: HAS_CT_INFER . bits;
549
549
550
550
/// Does this have [Placeholder]?
551
- const HAS_TY_PLACEHOLDER = 1 << 6 ;
551
+ const HAS_TY_PLACEHOLDER = 1 << 6 ;
552
552
/// Does this have [RePlaceholder]?
553
- const HAS_RE_PLACEHOLDER = 1 << 7 ;
553
+ const HAS_RE_PLACEHOLDER = 1 << 7 ;
554
554
/// Does this have [ConstKind::Placeholder]?
555
- const HAS_CT_PLACEHOLDER = 1 << 8 ;
555
+ const HAS_CT_PLACEHOLDER = 1 << 8 ;
556
556
557
557
/// `true` if there are "names" of regions and so forth
558
558
/// that are local to a particular fn/inferctxt
559
- const HAS_FREE_LOCAL_REGIONS = 1 << 9 ;
559
+ const HAS_FREE_LOCAL_REGIONS = 1 << 9 ;
560
560
561
561
/// `true` if there are "names" of types and regions and so forth
562
562
/// that are local to a particular fn
563
- const HAS_FREE_LOCAL_NAMES = TypeFlags :: HAS_TY_PARAM . bits
564
- | TypeFlags :: HAS_CT_PARAM . bits
565
- | TypeFlags :: HAS_TY_INFER . bits
566
- | TypeFlags :: HAS_CT_INFER . bits
567
- | TypeFlags :: HAS_TY_PLACEHOLDER . bits
568
- | TypeFlags :: HAS_CT_PLACEHOLDER . bits
569
- | TypeFlags :: HAS_FREE_LOCAL_REGIONS . bits;
563
+ const HAS_FREE_LOCAL_NAMES = TypeFlags :: HAS_TY_PARAM . bits
564
+ | TypeFlags :: HAS_CT_PARAM . bits
565
+ | TypeFlags :: HAS_TY_INFER . bits
566
+ | TypeFlags :: HAS_CT_INFER . bits
567
+ | TypeFlags :: HAS_TY_PLACEHOLDER . bits
568
+ | TypeFlags :: HAS_CT_PLACEHOLDER . bits
569
+ | TypeFlags :: HAS_FREE_LOCAL_REGIONS . bits;
570
570
571
571
/// Does this have [Projection] or [UnnormalizedProjection]?
572
- const HAS_TY_PROJECTION = 1 << 10 ;
572
+ const HAS_TY_PROJECTION = 1 << 10 ;
573
573
/// Does this have [Opaque]?
574
- const HAS_TY_OPAQUE = 1 << 11 ;
574
+ const HAS_TY_OPAQUE = 1 << 11 ;
575
575
/// Does this have [ConstKind::Unevaluated]?
576
- const HAS_CT_PROJECTION = 1 << 12 ;
576
+ const HAS_CT_PROJECTION = 1 << 12 ;
577
577
578
578
/// Could this type be normalized further?
579
- const HAS_PROJECTION = TypeFlags :: HAS_TY_PROJECTION . bits
580
- | TypeFlags :: HAS_TY_OPAQUE . bits
581
- | TypeFlags :: HAS_CT_PROJECTION . bits;
579
+ const HAS_PROJECTION = TypeFlags :: HAS_TY_PROJECTION . bits
580
+ | TypeFlags :: HAS_TY_OPAQUE . bits
581
+ | TypeFlags :: HAS_CT_PROJECTION . bits;
582
582
583
583
/// Present if the type belongs in a local type context.
584
584
/// Set for placeholders and inference variables that are not "Fresh".
585
- const KEEP_IN_LOCAL_TCX = 1 << 13 ;
585
+ const KEEP_IN_LOCAL_TCX = 1 << 13 ;
586
586
587
587
/// Is an error type reachable?
588
- const HAS_TY_ERR = 1 << 14 ;
588
+ const HAS_TY_ERR = 1 << 14 ;
589
589
590
590
/// Does this have any region that "appears free" in the type?
591
591
/// Basically anything but [ReLateBound] and [ReErased].
592
- const HAS_FREE_REGIONS = 1 << 15 ;
592
+ const HAS_FREE_REGIONS = 1 << 15 ;
593
593
594
594
/// Does this have any [ReLateBound] regions? Used to check
595
595
/// if a global bound is safe to evaluate.
596
- const HAS_RE_LATE_BOUND = 1 << 16 ;
596
+ const HAS_RE_LATE_BOUND = 1 << 16 ;
597
597
598
598
/// Does this have any [ReErased] regions?
599
- const HAS_RE_ERASED = 1 << 17 ;
599
+ const HAS_RE_ERASED = 1 << 17 ;
600
+
601
+ /// Does this value have parameters/placeholders/inference variables which could be
602
+ /// replaced later, in a way that would change the results of `impl` specialization?
603
+ const STILL_FURTHER_SPECIALIZABLE = 1 << 18 ;
600
604
601
605
/// Flags representing the nominal content of a type,
602
606
/// computed by FlagsComputation. If you add a new nominal
603
607
/// flag, it should be added here too.
604
- const NOMINAL_FLAGS = TypeFlags :: HAS_TY_PARAM . bits
605
- | TypeFlags :: HAS_RE_PARAM . bits
606
- | TypeFlags :: HAS_CT_PARAM . bits
607
- | TypeFlags :: HAS_TY_INFER . bits
608
- | TypeFlags :: HAS_RE_INFER . bits
609
- | TypeFlags :: HAS_CT_INFER . bits
610
- | TypeFlags :: HAS_TY_PLACEHOLDER . bits
611
- | TypeFlags :: HAS_RE_PLACEHOLDER . bits
612
- | TypeFlags :: HAS_CT_PLACEHOLDER . bits
613
- | TypeFlags :: HAS_FREE_LOCAL_REGIONS . bits
614
- | TypeFlags :: HAS_TY_PROJECTION . bits
615
- | TypeFlags :: HAS_TY_OPAQUE . bits
616
- | TypeFlags :: HAS_CT_PROJECTION . bits
617
- | TypeFlags :: KEEP_IN_LOCAL_TCX . bits
618
- | TypeFlags :: HAS_TY_ERR . bits
619
- | TypeFlags :: HAS_FREE_REGIONS . bits
620
- | TypeFlags :: HAS_RE_LATE_BOUND . bits
621
- | TypeFlags :: HAS_RE_ERASED . bits;
608
+ const NOMINAL_FLAGS = TypeFlags :: HAS_TY_PARAM . bits
609
+ | TypeFlags :: HAS_RE_PARAM . bits
610
+ | TypeFlags :: HAS_CT_PARAM . bits
611
+ | TypeFlags :: HAS_TY_INFER . bits
612
+ | TypeFlags :: HAS_RE_INFER . bits
613
+ | TypeFlags :: HAS_CT_INFER . bits
614
+ | TypeFlags :: HAS_TY_PLACEHOLDER . bits
615
+ | TypeFlags :: HAS_RE_PLACEHOLDER . bits
616
+ | TypeFlags :: HAS_CT_PLACEHOLDER . bits
617
+ | TypeFlags :: HAS_FREE_LOCAL_REGIONS . bits
618
+ | TypeFlags :: HAS_TY_PROJECTION . bits
619
+ | TypeFlags :: HAS_TY_OPAQUE . bits
620
+ | TypeFlags :: HAS_CT_PROJECTION . bits
621
+ | TypeFlags :: KEEP_IN_LOCAL_TCX . bits
622
+ | TypeFlags :: HAS_TY_ERR . bits
623
+ | TypeFlags :: HAS_FREE_REGIONS . bits
624
+ | TypeFlags :: HAS_RE_LATE_BOUND . bits
625
+ | TypeFlags :: HAS_RE_ERASED . bits
626
+ | TypeFlags :: STILL_FURTHER_SPECIALIZABLE . bits;
622
627
}
623
628
}
624
629
0 commit comments