@@ -26,7 +26,7 @@ use rustc_lint::{LateContext, LateLintPass};
26
26
use rustc_middle:: mir:: { Rvalue , StatementKind } ;
27
27
use rustc_middle:: ty:: adjustment:: { Adjust , Adjustment , AutoBorrow , AutoBorrowMutability } ;
28
28
use rustc_middle:: ty:: {
29
- self , Binder , BoundVariableKind , Clause , EarlyBinder , FnSig , GenericArgKind , List , ParamEnv , ParamTy ,
29
+ self , Binder , BoundVariableKind , ClauseKind , EarlyBinder , FnSig , GenericArgKind , List , ParamEnv , ParamTy ,
30
30
PredicateKind , ProjectionPredicate , Ty , TyCtxt , TypeVisitableExt , TypeckResults ,
31
31
} ;
32
32
use rustc_session:: { declare_tool_lint, impl_lint_pass} ;
@@ -1133,7 +1133,7 @@ fn needless_borrow_impl_arg_position<'tcx>(
1133
1133
let projection_predicates = predicates
1134
1134
. iter ( )
1135
1135
. filter_map ( |predicate| {
1136
- if let PredicateKind :: Clause ( Clause :: Projection ( projection_predicate) ) = predicate. kind ( ) . skip_binder ( ) {
1136
+ if let PredicateKind :: Clause ( ClauseKind :: Projection ( projection_predicate) ) = predicate. kind ( ) . skip_binder ( ) {
1137
1137
Some ( projection_predicate)
1138
1138
} else {
1139
1139
None
@@ -1147,7 +1147,7 @@ fn needless_borrow_impl_arg_position<'tcx>(
1147
1147
if predicates
1148
1148
. iter ( )
1149
1149
. filter_map ( |predicate| {
1150
- if let PredicateKind :: Clause ( Clause :: Trait ( trait_predicate) ) = predicate. kind ( ) . skip_binder ( )
1150
+ if let PredicateKind :: Clause ( ClauseKind :: Trait ( trait_predicate) ) = predicate. kind ( ) . skip_binder ( )
1151
1151
&& trait_predicate. trait_ref . self_ty ( ) == param_ty. to_ty ( cx. tcx )
1152
1152
{
1153
1153
Some ( trait_predicate. trait_ref . def_id )
@@ -1209,7 +1209,7 @@ fn needless_borrow_impl_arg_position<'tcx>(
1209
1209
}
1210
1210
1211
1211
predicates. iter ( ) . all ( |predicate| {
1212
- if let PredicateKind :: Clause ( Clause :: Trait ( trait_predicate) ) = predicate. kind ( ) . skip_binder ( )
1212
+ if let PredicateKind :: Clause ( ClauseKind :: Trait ( trait_predicate) ) = predicate. kind ( ) . skip_binder ( )
1213
1213
&& cx. tcx . is_diagnostic_item ( sym:: IntoIterator , trait_predicate. trait_ref . def_id )
1214
1214
&& let ty:: Param ( param_ty) = trait_predicate. self_ty ( ) . kind ( )
1215
1215
&& let GenericArgKind :: Type ( ty) = substs_with_referent_ty[ param_ty. index as usize ] . unpack ( )
0 commit comments