File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -691,7 +691,7 @@ fn matches_preds<'tcx>(
691
691
. iter ( )
692
692
. all ( |& p| match cx. tcx . instantiate_bound_regions_with_erased ( p) {
693
693
ExistentialPredicate :: Trait ( p) => infcx
694
- . type_implements_trait ( p. def_id , [ ty. into ( ) ] . into_iter ( ) . chain ( p. args . iter ( ) ) , cx. param_env )
694
+ . type_implements_trait ( p. def_id , iter :: once ( ty. into ( ) ) . chain ( p. args . iter ( ) ) , cx. param_env )
695
695
. must_apply_modulo_regions ( ) ,
696
696
ExistentialPredicate :: Projection ( p) => infcx. predicate_must_hold_modulo_regions ( & Obligation :: new (
697
697
cx. tcx ,
Original file line number Diff line number Diff line change @@ -291,7 +291,7 @@ pub fn implements_trait_with_env_from_iter<'tcx>(
291
291
. map ( |arg| arg. into ( ) . unwrap_or_else ( || infcx. next_ty_var ( DUMMY_SP ) . into ( ) ) )
292
292
. collect :: < Vec < _ > > ( ) ;
293
293
294
- let trait_ref = TraitRef :: new ( tcx, trait_id, [ GenericArg :: from ( ty) ] . into_iter ( ) . chain ( args) ) ;
294
+ let trait_ref = TraitRef :: new ( tcx, trait_id, iter :: once ( GenericArg :: from ( ty) ) . chain ( args) ) ;
295
295
296
296
debug_assert_matches ! (
297
297
tcx. def_kind( trait_id) ,
Original file line number Diff line number Diff line change @@ -92,6 +92,8 @@ fn run_clippy_for_package(project: &str) -> bool {
92
92
"-D" ,
93
93
"clippy::dbg_macro" ,
94
94
"-D" ,
95
+ "clippy::iter_on_single_items" ,
96
+ "-D" ,
95
97
"clippy::needless_pass_by_ref_mut" ,
96
98
"-D" ,
97
99
"clippy::significant_drop_tightening" ,
You can’t perform that action at this time.
0 commit comments