rust/tests/ui/issues/issue-43431.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
336 B
Rust
Raw Normal View History

#![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 type bindings are not allowed here
}
}
fn main() {}