diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-43431.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-43431.rs b/src/test/ui/issues/issue-43431.rs new file mode 100644 index 000000000..e7ec35105 --- /dev/null +++ b/src/test/ui/issues/issue-43431.rs @@ -0,0 +1,14 @@ +#![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() {} |