@@ -1727,16 +1727,6 @@ impl_stable_hash_for!(struct Static<'tcx> {
1727
1727
ty
1728
1728
} ) ;
1729
1729
1730
- /// The `Projection` data structure defines things of the form `B.x`
1731
- /// or `*B` or `B[index]`. Note that it is parameterized because it is
1732
- /// shared between `Constant` and `Place`. See the aliases
1733
- /// `PlaceProjection` etc below.
1734
- #[ derive( Clone , Debug , PartialEq , Eq , Hash , RustcEncodable , RustcDecodable ) ]
1735
- pub struct Projection < ' tcx , B , V , T > {
1736
- pub base : B ,
1737
- pub elem : ProjectionElem < ' tcx , V , T > ,
1738
- }
1739
-
1740
1730
#[ derive( Clone , Copy , Debug , PartialEq , Eq , Hash , RustcEncodable , RustcDecodable ) ]
1741
1731
pub enum ProjectionElem < ' tcx , V , T > {
1742
1732
Deref ,
@@ -1775,10 +1765,6 @@ pub enum ProjectionElem<'tcx, V, T> {
1775
1765
Downcast ( & ' tcx AdtDef , usize ) ,
1776
1766
}
1777
1767
1778
- /// Alias for projections as they appear in places, where the base is a place
1779
- /// and the index is a local.
1780
- pub type PlaceProjection < ' tcx > = Projection < ' tcx , Place < ' tcx > , Local , Ty < ' tcx > > ;
1781
-
1782
1768
/// Alias for projections as they appear in places, where the base is a place
1783
1769
/// and the index is a local.
1784
1770
pub type PlaceElem < ' tcx > = ProjectionElem < ' tcx , Local , Ty < ' tcx > > ;
@@ -2950,26 +2936,6 @@ impl<'tcx, V, T> TypeFoldable<'tcx> for ProjectionElem<'tcx, V, T>
2950
2936
}
2951
2937
}
2952
2938
2953
- impl < ' tcx , B , V , T > TypeFoldable < ' tcx > for Projection < ' tcx , B , V , T >
2954
- where
2955
- B : TypeFoldable < ' tcx > ,
2956
- V : TypeFoldable < ' tcx > ,
2957
- T : TypeFoldable < ' tcx > ,
2958
- {
2959
- fn super_fold_with < ' gcx : ' tcx , F : TypeFolder < ' gcx , ' tcx > > ( & self , folder : & mut F ) -> Self {
2960
-
2961
- let base = self . base . fold_with ( folder) ;
2962
- let elem = self . elem . fold_with ( folder) ;
2963
- Projection { base, elem }
2964
- }
2965
-
2966
- fn super_visit_with < Vs : TypeVisitor < ' tcx > > ( & self , visitor : & mut Vs ) -> bool {
2967
-
2968
- self . base . visit_with ( visitor) ||
2969
- self . elem . visit_with ( visitor)
2970
- }
2971
- }
2972
-
2973
2939
impl < ' tcx > TypeFoldable < ' tcx > for Field {
2974
2940
fn super_fold_with < ' gcx : ' tcx , F : TypeFolder < ' gcx , ' tcx > > ( & self , _: & mut F ) -> Self {
2975
2941
* self
0 commit comments