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