rust/tests/ui/issues/issue-43431.rs
2024-05-30 22:52:33 +02:00

15 lines
339 B
Rust

#![feature(fn_traits)]
trait CallSingle<A, B> {
fn call(&self, a: A) -> B where Self: Sized, Self: Fn(A) -> B;
}
impl<A, B, F: Fn(A) -> B> CallSingle<A, B> for F {
fn call(&self, a: A) -> B {
<Self as Fn(A) -> B>::call(self, (a,))
//~^ ERROR associated item constraints are not allowed here
}
}
fn main() {}