mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
14 lines
336 B
Rust
14 lines
336 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 type bindings are not allowed here
|
|
}
|
|
}
|
|
|
|
fn main() {}
|