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