diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs index 5b31998b7d33f..74b6652981a8b 100644 --- a/compiler/rustc_trait_selection/src/traits/select/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs @@ -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(&mut self, cycle: I) -> bool + pub fn coinductive_match(&mut self, mut cycle: I) -> bool where I: Iterator>, { - let mut cycle = cycle; cycle.all(|predicate| self.coinductive_predicate(predicate)) }