@@ -141,7 +141,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
141
141
142
142
let predicates = self . tcx . predicates_of ( adt_def. did ) . predicates ;
143
143
let where_clauses: Vec < _ > = predicates
144
- . into_iter ( )
144
+ . iter ( )
145
145
. map ( |( wc, _) | wc. subst ( self . tcx , bound_vars) )
146
146
. filter_map ( |wc| LowerInto :: < Option < chalk_ir:: QuantifiedWhereClause < RustInterner < ' tcx > > > > :: lower_into ( wc, & self . interner ) )
147
147
. collect ( ) ;
@@ -174,7 +174,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
174
174
phantom_data : adt_def. is_phantom_data ( ) ,
175
175
} ,
176
176
} ) ;
177
- return struct_datum;
177
+ struct_datum
178
178
}
179
179
180
180
fn fn_def_datum (
@@ -187,7 +187,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
187
187
188
188
let predicates = self . tcx . predicates_defined_on ( def_id) . predicates ;
189
189
let where_clauses: Vec < _ > = predicates
190
- . into_iter ( )
190
+ . iter ( )
191
191
. map ( |( wc, _) | wc. subst ( self . tcx , & bound_vars) )
192
192
. filter_map ( |wc| LowerInto :: < Option < chalk_ir:: QuantifiedWhereClause < RustInterner < ' tcx > > > > :: lower_into ( wc, & self . interner ) ) . collect ( ) ;
193
193
@@ -276,7 +276,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
276
276
parameters[ 0 ] . assert_ty_ref ( & self . interner ) . could_match ( & self . interner , & lowered_ty)
277
277
} ) ;
278
278
279
- let impls = matched_impls. map ( |matched_impl| chalk_ir:: ImplId ( matched_impl ) ) . collect ( ) ;
279
+ let impls = matched_impls. map ( chalk_ir:: ImplId ) . collect ( ) ;
280
280
impls
281
281
}
282
282
@@ -379,7 +379,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
379
379
ty:: AdtKind :: Struct | ty:: AdtKind :: Union => None ,
380
380
ty:: AdtKind :: Enum => {
381
381
let constraint = self . tcx . adt_sized_constraint ( adt_def. did ) ;
382
- if constraint. 0 . len ( ) > 0 { unimplemented ! ( ) } else { Some ( true ) }
382
+ if ! constraint. 0 . is_empty ( ) { unimplemented ! ( ) } else { Some ( true ) }
383
383
}
384
384
} ,
385
385
_ => None ,
@@ -398,7 +398,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
398
398
ty:: AdtKind :: Struct | ty:: AdtKind :: Union => None ,
399
399
ty:: AdtKind :: Enum => {
400
400
let constraint = self . tcx . adt_sized_constraint ( adt_def. did ) ;
401
- if constraint. 0 . len ( ) > 0 { unimplemented ! ( ) } else { Some ( true ) }
401
+ if ! constraint. 0 . is_empty ( ) { unimplemented ! ( ) } else { Some ( true ) }
402
402
}
403
403
} ,
404
404
_ => None ,
@@ -440,7 +440,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
440
440
FnOnce => self . tcx . lang_items ( ) . fn_once_trait ( ) ,
441
441
Unsize => self . tcx . lang_items ( ) . unsize_trait ( ) ,
442
442
} ;
443
- def_id. map ( |t| chalk_ir:: TraitId ( t ) )
443
+ def_id. map ( chalk_ir:: TraitId )
444
444
}
445
445
446
446
fn is_object_safe ( & self , trait_id : chalk_ir:: TraitId < RustInterner < ' tcx > > ) -> bool {
0 commit comments