@@ -6970,13 +6970,67 @@ pub trait HasProjectionTypes {
6970
6970
fn has_projection_types ( & self ) -> bool ;
6971
6971
}
6972
6972
6973
+ impl < ' tcx > HasProjectionTypes for ty:: GenericBounds < ' tcx > {
6974
+ fn has_projection_types ( & self ) -> bool {
6975
+ self . predicates . iter ( ) . any ( |p| p. has_projection_types ( ) )
6976
+ }
6977
+ }
6978
+
6979
+ impl < ' tcx > HasProjectionTypes for Predicate < ' tcx > {
6980
+ fn has_projection_types ( & self ) -> bool {
6981
+ match * self {
6982
+ Predicate :: Trait ( ref data) => data. has_projection_types ( ) ,
6983
+ Predicate :: Equate ( ref data) => data. has_projection_types ( ) ,
6984
+ Predicate :: RegionOutlives ( ref data) => data. has_projection_types ( ) ,
6985
+ Predicate :: TypeOutlives ( ref data) => data. has_projection_types ( ) ,
6986
+ Predicate :: Projection ( ref data) => data. has_projection_types ( ) ,
6987
+ }
6988
+ }
6989
+ }
6990
+
6991
+ impl < ' tcx > HasProjectionTypes for TraitPredicate < ' tcx > {
6992
+ fn has_projection_types ( & self ) -> bool {
6993
+ self . trait_ref . has_projection_types ( )
6994
+ }
6995
+ }
6996
+
6997
+ impl < ' tcx > HasProjectionTypes for EquatePredicate < ' tcx > {
6998
+ fn has_projection_types ( & self ) -> bool {
6999
+ self . 0 . has_projection_types ( ) || self . 1 . has_projection_types ( )
7000
+ }
7001
+ }
7002
+
7003
+ impl HasProjectionTypes for Region {
7004
+ fn has_projection_types ( & self ) -> bool {
7005
+ false
7006
+ }
7007
+ }
7008
+
7009
+ impl < T : HasProjectionTypes , U : HasProjectionTypes > HasProjectionTypes for OutlivesPredicate < T , U > {
7010
+ fn has_projection_types ( & self ) -> bool {
7011
+ self . 0 . has_projection_types ( ) || self . 1 . has_projection_types ( )
7012
+ }
7013
+ }
7014
+
7015
+ impl < ' tcx > HasProjectionTypes for ProjectionPredicate < ' tcx > {
7016
+ fn has_projection_types ( & self ) -> bool {
7017
+ self . projection_ty . has_projection_types ( ) || self . ty . has_projection_types ( )
7018
+ }
7019
+ }
7020
+
7021
+ impl < ' tcx > HasProjectionTypes for ProjectionTy < ' tcx > {
7022
+ fn has_projection_types ( & self ) -> bool {
7023
+ self . trait_ref . has_projection_types ( )
7024
+ }
7025
+ }
7026
+
6973
7027
impl < ' tcx > HasProjectionTypes for Ty < ' tcx > {
6974
7028
fn has_projection_types ( & self ) -> bool {
6975
7029
ty:: type_has_projection ( * self )
6976
7030
}
6977
7031
}
6978
7032
6979
- impl < ' tcx > HasProjectionTypes for ty :: TraitRef < ' tcx > {
7033
+ impl < ' tcx > HasProjectionTypes for TraitRef < ' tcx > {
6980
7034
fn has_projection_types ( & self ) -> bool {
6981
7035
self . substs . has_projection_types ( )
6982
7036
}
@@ -7012,31 +7066,31 @@ impl<'tcx,T> HasProjectionTypes for Box<T>
7012
7066
}
7013
7067
}
7014
7068
7015
- impl < T > HasProjectionTypes for ty :: Binder < T >
7069
+ impl < T > HasProjectionTypes for Binder < T >
7016
7070
where T : HasProjectionTypes
7017
7071
{
7018
7072
fn has_projection_types ( & self ) -> bool {
7019
7073
self . 0 . has_projection_types ( )
7020
7074
}
7021
7075
}
7022
7076
7023
- impl < ' tcx > HasProjectionTypes for ty :: FnOutput < ' tcx > {
7077
+ impl < ' tcx > HasProjectionTypes for FnOutput < ' tcx > {
7024
7078
fn has_projection_types ( & self ) -> bool {
7025
7079
match * self {
7026
- ty :: FnConverging ( t) => t. has_projection_types ( ) ,
7027
- ty :: FnDiverging => false ,
7080
+ FnConverging ( t) => t. has_projection_types ( ) ,
7081
+ FnDiverging => false ,
7028
7082
}
7029
7083
}
7030
7084
}
7031
7085
7032
- impl < ' tcx > HasProjectionTypes for ty :: FnSig < ' tcx > {
7086
+ impl < ' tcx > HasProjectionTypes for FnSig < ' tcx > {
7033
7087
fn has_projection_types ( & self ) -> bool {
7034
7088
self . inputs . iter ( ) . any ( |t| t. has_projection_types ( ) ) ||
7035
7089
self . output . has_projection_types ( )
7036
7090
}
7037
7091
}
7038
7092
7039
- impl < ' tcx > HasProjectionTypes for ty :: BareFnTy < ' tcx > {
7093
+ impl < ' tcx > HasProjectionTypes for BareFnTy < ' tcx > {
7040
7094
fn has_projection_types ( & self ) -> bool {
7041
7095
self . sig . has_projection_types ( )
7042
7096
}
@@ -7046,7 +7100,7 @@ pub trait ReferencesError {
7046
7100
fn references_error ( & self ) -> bool ;
7047
7101
}
7048
7102
7049
- impl < T : ReferencesError > ReferencesError for ty :: Binder < T > {
7103
+ impl < T : ReferencesError > ReferencesError for Binder < T > {
7050
7104
fn references_error ( & self ) -> bool {
7051
7105
self . 0 . references_error ( )
7052
7106
}
@@ -7058,58 +7112,58 @@ impl<T:ReferencesError> ReferencesError for Rc<T> {
7058
7112
}
7059
7113
}
7060
7114
7061
- impl < ' tcx > ReferencesError for ty :: TraitPredicate < ' tcx > {
7115
+ impl < ' tcx > ReferencesError for TraitPredicate < ' tcx > {
7062
7116
fn references_error ( & self ) -> bool {
7063
7117
self . trait_ref . references_error ( )
7064
7118
}
7065
7119
}
7066
7120
7067
- impl < ' tcx > ReferencesError for ty :: ProjectionPredicate < ' tcx > {
7121
+ impl < ' tcx > ReferencesError for ProjectionPredicate < ' tcx > {
7068
7122
fn references_error ( & self ) -> bool {
7069
7123
self . projection_ty . trait_ref . references_error ( ) || self . ty . references_error ( )
7070
7124
}
7071
7125
}
7072
7126
7073
- impl < ' tcx > ReferencesError for ty :: TraitRef < ' tcx > {
7127
+ impl < ' tcx > ReferencesError for TraitRef < ' tcx > {
7074
7128
fn references_error ( & self ) -> bool {
7075
7129
self . input_types ( ) . iter ( ) . any ( |t| t. references_error ( ) )
7076
7130
}
7077
7131
}
7078
7132
7079
- impl < ' tcx > ReferencesError for ty :: Ty < ' tcx > {
7133
+ impl < ' tcx > ReferencesError for Ty < ' tcx > {
7080
7134
fn references_error ( & self ) -> bool {
7081
- ty :: type_is_error ( * self )
7135
+ type_is_error ( * self )
7082
7136
}
7083
7137
}
7084
7138
7085
- impl < ' tcx > ReferencesError for ty :: Predicate < ' tcx > {
7139
+ impl < ' tcx > ReferencesError for Predicate < ' tcx > {
7086
7140
fn references_error ( & self ) -> bool {
7087
7141
match * self {
7088
- ty :: Predicate :: Trait ( ref data) => data. references_error ( ) ,
7089
- ty :: Predicate :: Equate ( ref data) => data. references_error ( ) ,
7090
- ty :: Predicate :: RegionOutlives ( ref data) => data. references_error ( ) ,
7091
- ty :: Predicate :: TypeOutlives ( ref data) => data. references_error ( ) ,
7092
- ty :: Predicate :: Projection ( ref data) => data. references_error ( ) ,
7142
+ Predicate :: Trait ( ref data) => data. references_error ( ) ,
7143
+ Predicate :: Equate ( ref data) => data. references_error ( ) ,
7144
+ Predicate :: RegionOutlives ( ref data) => data. references_error ( ) ,
7145
+ Predicate :: TypeOutlives ( ref data) => data. references_error ( ) ,
7146
+ Predicate :: Projection ( ref data) => data. references_error ( ) ,
7093
7147
}
7094
7148
}
7095
7149
}
7096
7150
7097
- impl < A , B > ReferencesError for ty :: OutlivesPredicate < A , B >
7151
+ impl < A , B > ReferencesError for OutlivesPredicate < A , B >
7098
7152
where A : ReferencesError , B : ReferencesError
7099
7153
{
7100
7154
fn references_error ( & self ) -> bool {
7101
7155
self . 0 . references_error ( ) || self . 1 . references_error ( )
7102
7156
}
7103
7157
}
7104
7158
7105
- impl < ' tcx > ReferencesError for ty :: EquatePredicate < ' tcx >
7159
+ impl < ' tcx > ReferencesError for EquatePredicate < ' tcx >
7106
7160
{
7107
7161
fn references_error ( & self ) -> bool {
7108
7162
self . 0 . references_error ( ) || self . 1 . references_error ( )
7109
7163
}
7110
7164
}
7111
7165
7112
- impl ReferencesError for ty :: Region
7166
+ impl ReferencesError for Region
7113
7167
{
7114
7168
fn references_error ( & self ) -> bool {
7115
7169
false
0 commit comments