@@ -660,9 +660,6 @@ pub enum ImplSource<'tcx, N> {
660
660
661
661
/// ImplSource for trait upcasting coercion
662
662
TraitUpcasting ( ImplSourceTraitUpcastingData < N > ) ,
663
-
664
- /// ImplSource for a trait alias.
665
- TraitAlias ( ImplSourceTraitAliasData < ' tcx , N > ) ,
666
663
}
667
664
668
665
impl < ' tcx , N > ImplSource < ' tcx , N > {
@@ -671,7 +668,6 @@ impl<'tcx, N> ImplSource<'tcx, N> {
671
668
ImplSource :: UserDefined ( i) => i. nested ,
672
669
ImplSource :: Param ( n, _) | ImplSource :: Builtin ( n) => n,
673
670
ImplSource :: Object ( d) => d. nested ,
674
- ImplSource :: TraitAlias ( d) => d. nested ,
675
671
ImplSource :: TraitUpcasting ( d) => d. nested ,
676
672
}
677
673
}
@@ -681,7 +677,6 @@ impl<'tcx, N> ImplSource<'tcx, N> {
681
677
ImplSource :: UserDefined ( i) => & i. nested ,
682
678
ImplSource :: Param ( n, _) | ImplSource :: Builtin ( n) => & n,
683
679
ImplSource :: Object ( d) => & d. nested ,
684
- ImplSource :: TraitAlias ( d) => & d. nested ,
685
680
ImplSource :: TraitUpcasting ( d) => & d. nested ,
686
681
}
687
682
}
@@ -691,7 +686,6 @@ impl<'tcx, N> ImplSource<'tcx, N> {
691
686
ImplSource :: UserDefined ( i) => & mut i. nested ,
692
687
ImplSource :: Param ( n, _) | ImplSource :: Builtin ( n) => n,
693
688
ImplSource :: Object ( d) => & mut d. nested ,
694
- ImplSource :: TraitAlias ( d) => & mut d. nested ,
695
689
ImplSource :: TraitUpcasting ( d) => & mut d. nested ,
696
690
}
697
691
}
@@ -709,15 +703,9 @@ impl<'tcx, N> ImplSource<'tcx, N> {
709
703
ImplSource :: Param ( n, ct) => ImplSource :: Param ( n. into_iter ( ) . map ( f) . collect ( ) , ct) ,
710
704
ImplSource :: Builtin ( n) => ImplSource :: Builtin ( n. into_iter ( ) . map ( f) . collect ( ) ) ,
711
705
ImplSource :: Object ( o) => ImplSource :: Object ( ImplSourceObjectData {
712
- upcast_trait_def_id : o. upcast_trait_def_id ,
713
706
vtable_base : o. vtable_base ,
714
707
nested : o. nested . into_iter ( ) . map ( f) . collect ( ) ,
715
708
} ) ,
716
- ImplSource :: TraitAlias ( d) => ImplSource :: TraitAlias ( ImplSourceTraitAliasData {
717
- alias_def_id : d. alias_def_id ,
718
- substs : d. substs ,
719
- nested : d. nested . into_iter ( ) . map ( f) . collect ( ) ,
720
- } ) ,
721
709
ImplSource :: TraitUpcasting ( d) => {
722
710
ImplSource :: TraitUpcasting ( ImplSourceTraitUpcastingData {
723
711
vtable_vptr_slot : d. vtable_vptr_slot ,
@@ -761,9 +749,6 @@ pub struct ImplSourceTraitUpcastingData<N> {
761
749
#[ derive( PartialEq , Eq , Clone , TyEncodable , TyDecodable , HashStable , Lift ) ]
762
750
#[ derive( TypeFoldable , TypeVisitable ) ]
763
751
pub struct ImplSourceObjectData < N > {
764
- /// `Foo` upcast to the obligation trait. This will be some supertrait of `Foo`.
765
- pub upcast_trait_def_id : DefId ,
766
-
767
752
/// The vtable is formed by concatenating together the method lists of
768
753
/// the base object trait and all supertraits, pointers to supertrait vtable will
769
754
/// be provided when necessary; this is the start of `upcast_trait_ref`'s methods
@@ -773,14 +758,6 @@ pub struct ImplSourceObjectData<N> {
773
758
pub nested : Vec < N > ,
774
759
}
775
760
776
- #[ derive( Clone , PartialEq , Eq , TyEncodable , TyDecodable , HashStable , Lift ) ]
777
- #[ derive( TypeFoldable , TypeVisitable ) ]
778
- pub struct ImplSourceTraitAliasData < ' tcx , N > {
779
- pub alias_def_id : DefId ,
780
- pub substs : SubstsRef < ' tcx > ,
781
- pub nested : Vec < N > ,
782
- }
783
-
784
761
#[ derive( Clone , Debug , PartialEq , Eq , Hash , HashStable , PartialOrd , Ord ) ]
785
762
pub enum ObjectSafetyViolation {
786
763
/// `Self: Sized` declared on the trait.
0 commit comments