]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-20225.rs
b15f2a631fd86533584aef6d1b737fde357cb7ab
[rust.git] / src / test / ui / issues / issue-20225.rs
1 #![feature(fn_traits, unboxed_closures)]
2
3 struct Foo;
4
5 impl<'a, T> Fn<(&'a T,)> for Foo {
6   extern "rust-call" fn call(&self, (_,): (T,)) {}
7   //~^ ERROR: has an incompatible type for trait
8   //~| expected reference
9 }
10
11 impl<'a, T> FnMut<(&'a T,)> for Foo {
12   extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {}
13   //~^ ERROR: has an incompatible type for trait
14   //~| expected reference
15 }
16
17 impl<'a, T> FnOnce<(&'a T,)> for Foo {
18   type Output = ();
19
20   extern "rust-call" fn call_once(self, (_,): (T,)) {}
21   //~^ ERROR: has an incompatible type for trait
22   //~| expected reference
23 }
24
25 fn main() {}