]>
Commit | Line | Data |
---|---|---|
476ff2be | 1 | #![feature(fn_traits, unboxed_closures)] |
c34b1796 AL |
2 | |
3 | struct Foo; | |
4 | ||
5 | impl<'a, T> Fn<(&'a T,)> for Foo { | |
6 | extern "rust-call" fn call(&self, (_,): (T,)) {} | |
c1a9b12d | 7 | //~^ ERROR: has an incompatible type for trait |
c34b1796 AL |
8 | } |
9 | ||
10 | impl<'a, T> FnMut<(&'a T,)> for Foo { | |
11 | extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {} | |
c1a9b12d | 12 | //~^ ERROR: has an incompatible type for trait |
c34b1796 AL |
13 | } |
14 | ||
15 | impl<'a, T> FnOnce<(&'a T,)> for Foo { | |
16 | type Output = (); | |
17 | ||
18 | extern "rust-call" fn call_once(self, (_,): (T,)) {} | |
c1a9b12d | 19 | //~^ ERROR: has an incompatible type for trait |
c34b1796 AL |
20 | } |
21 | ||
22 | fn main() {} |