blob: 70685504cccc3fc6d694b1711b696f72451ead4e [file] [log] [blame]
//@ edition:2021
// issue: rust-lang/rust#127555
pub trait Foo {
fn bar<F>(&mut self, func: F) -> impl std::future::Future<Output = ()> + Send
where
F: FnMut();
}
struct Baz {}
impl Foo for Baz {
async fn bar<F>(&mut self, _func: F) -> ()
where
F: FnMut() + Send,
//~^ ERROR impl has stricter requirements than trait
{
()
}
}
fn main() {}