]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lazy-type-alias-impl-trait/opaque_vs_opaque.rs
Rollup merge of #100479 - compiler-errors:argument-type-error-improvements, r=lcnr
[rust.git] / src / test / ui / lazy-type-alias-impl-trait / opaque_vs_opaque.rs
1 // check-pass
2
3 fn main() {}
4
5 fn filter_fold<T, Acc, PRED: FnMut(&T) -> bool, FOLD: FnMut(Acc, T) -> Acc>(
6     mut predicate: PRED,
7     mut fold: FOLD,
8 ) -> impl FnMut(Acc, T) -> Acc {
9     move |acc, item| if predicate(&item) { fold(acc, item) } else { acc }
10 }