2019-01-02 08:14:24 -06:00
|
|
|
#![feature(fn_traits)]
|
|
|
|
|
2017-02-22 23:04:09 -06:00
|
|
|
struct Test;
|
|
|
|
|
|
|
|
impl FnOnce<(u32, u32)> for Test {
|
2019-01-02 08:14:24 -06:00
|
|
|
//~^ ERROR the precise format of `Fn`-family traits' type parameters is subject to change
|
2020-04-15 19:00:23 -05:00
|
|
|
//~| ERROR manual implementations of `FnOnce` are experimental
|
2017-02-22 23:04:09 -06:00
|
|
|
type Output = u32;
|
|
|
|
|
|
|
|
extern "rust-call" fn call_once(self, (a, b): (u32, u32)) -> u32 {
|
|
|
|
a + b
|
|
|
|
}
|
2019-04-10 18:40:12 -05:00
|
|
|
//~^^^ ERROR rust-call ABI is subject to change
|
2017-02-22 23:04:09 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
assert_eq!(Test(1u32, 2u32), 3u32);
|
|
|
|
}
|