2016-11-10 19:08:21 +02:00
|
|
|
#![feature(fn_traits, unboxed_closures)]
|
2015-03-15 13:25:46 -07:00
|
|
|
|
|
|
|
struct Foo;
|
|
|
|
|
|
|
|
impl<'a, T> Fn<(&'a T,)> for Foo {
|
2015-03-11 10:08:33 -04:00
|
|
|
extern "rust-call" fn call(&self, (_,): (T,)) {}
|
2015-07-18 21:14:36 -04:00
|
|
|
//~^ ERROR: has an incompatible type for trait
|
2015-03-11 10:08:33 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a, T> FnMut<(&'a T,)> for Foo {
|
|
|
|
extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {}
|
2015-07-18 21:14:36 -04:00
|
|
|
//~^ ERROR: has an incompatible type for trait
|
2015-03-11 10:08:33 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a, T> FnOnce<(&'a T,)> for Foo {
|
2015-03-15 13:25:46 -07:00
|
|
|
type Output = ();
|
|
|
|
|
2015-03-11 10:08:33 -04:00
|
|
|
extern "rust-call" fn call_once(self, (_,): (T,)) {}
|
2015-07-18 21:14:36 -04:00
|
|
|
//~^ ERROR: has an incompatible type for trait
|
2015-03-15 13:25:46 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|