Rollup merge of #79516 - jyn514:cleanup-trait-solver, r=Aaron1011

Remove unnecessary `mut` binding

Found while fiddling around with https://github.com/rust-lang/rust/issues/77459.
This commit is contained in:
Dylan DPC 2020-11-29 03:14:27 +01:00 committed by GitHub
commit 47e74a9a51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -833,11 +833,10 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
/// - it also appears in the backtrace at some position `X`,
/// - all the predicates at positions `X..` between `X` and the top are
/// also defaulted traits.
pub fn coinductive_match<I>(&mut self, cycle: I) -> bool
pub fn coinductive_match<I>(&mut self, mut cycle: I) -> bool
where
I: Iterator<Item = ty::Predicate<'tcx>>,
{
let mut cycle = cycle;
cycle.all(|predicate| self.coinductive_predicate(predicate))
}