// Repro for . //@ edition: 2021 //@ revisions: assumptions no_assumptions //@[assumptions] compile-flags: -Zhigher-ranked-assumptions //@[assumptions] check-pass //@[no_assumptions] known-bug: #110338 use std::collections::HashSet; use std::future::Future; trait MyTrait { fn blah(&self, x: impl Iterator) -> impl Future + Send; } fn foo( val: T, unique_x: HashSet, ) -> impl Future + Send { let cached = HashSet::new(); async move { let xs = unique_x.union(&cached) // .copied() // works .map(|x| *x) // error ; let blah = val.blah(xs.into_iter()).await; } } fn main() {}