2017-07-28 17:13:40 -05:00
|
|
|
#![feature(fn_traits)]
|
|
|
|
|
|
|
|
trait CallSingle<A, B> {
|
2018-05-30 07:06:08 -05:00
|
|
|
fn call(&self, a: A) -> B where Self: Sized, Self: Fn(A) -> B;
|
2017-07-28 17:13:40 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
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() {}
|