fix clippy::into_iter_on_ref: use .iter() instead of into_iter() on references.
This commit is contained in:
parent
ea9ccfa42c
commit
4ba1a19463
2 changed files with 3 additions and 3 deletions
|
@ -141,7 +141,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
|
||||||
|
|
||||||
let predicates = self.tcx.predicates_of(adt_def.did).predicates;
|
let predicates = self.tcx.predicates_of(adt_def.did).predicates;
|
||||||
let where_clauses: Vec<_> = predicates
|
let where_clauses: Vec<_> = predicates
|
||||||
.into_iter()
|
.iter()
|
||||||
.map(|(wc, _)| wc.subst(self.tcx, bound_vars))
|
.map(|(wc, _)| wc.subst(self.tcx, bound_vars))
|
||||||
.filter_map(|wc| LowerInto::<Option<chalk_ir::QuantifiedWhereClause<RustInterner<'tcx>>>>::lower_into(wc, &self.interner))
|
.filter_map(|wc| LowerInto::<Option<chalk_ir::QuantifiedWhereClause<RustInterner<'tcx>>>>::lower_into(wc, &self.interner))
|
||||||
.collect();
|
.collect();
|
||||||
|
@ -187,7 +187,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
|
||||||
|
|
||||||
let predicates = self.tcx.predicates_defined_on(def_id).predicates;
|
let predicates = self.tcx.predicates_defined_on(def_id).predicates;
|
||||||
let where_clauses: Vec<_> = predicates
|
let where_clauses: Vec<_> = predicates
|
||||||
.into_iter()
|
.iter()
|
||||||
.map(|(wc, _)| wc.subst(self.tcx, &bound_vars))
|
.map(|(wc, _)| wc.subst(self.tcx, &bound_vars))
|
||||||
.filter_map(|wc| LowerInto::<Option<chalk_ir::QuantifiedWhereClause<RustInterner<'tcx>>>>::lower_into(wc, &self.interner)).collect();
|
.filter_map(|wc| LowerInto::<Option<chalk_ir::QuantifiedWhereClause<RustInterner<'tcx>>>>::lower_into(wc, &self.interner)).collect();
|
||||||
|
|
||||||
|
|
|
@ -443,7 +443,7 @@ fn opaque_type_projection_predicates(
|
||||||
|
|
||||||
let bounds = tcx.predicates_of(def_id);
|
let bounds = tcx.predicates_of(def_id);
|
||||||
let predicates =
|
let predicates =
|
||||||
util::elaborate_predicates(tcx, bounds.predicates.into_iter().map(|&(pred, _)| pred));
|
util::elaborate_predicates(tcx, bounds.predicates.iter().map(|&(pred, _)| pred));
|
||||||
|
|
||||||
let filtered_predicates = predicates.filter_map(|obligation| {
|
let filtered_predicates = predicates.filter_map(|obligation| {
|
||||||
let pred = obligation.predicate;
|
let pred = obligation.predicate;
|
||||||
|
|
Loading…
Add table
Reference in a new issue