2018-08-30 14:18:55 +02:00
|
|
|
//@ run-pass
|
2015-01-28 08:34:18 -05:00
|
|
|
#[derive(PartialEq, Debug)]
|
2015-03-25 17:06:52 -07:00
|
|
|
struct Foo(isize);
|
2015-01-28 08:34:18 -05:00
|
|
|
#[derive(PartialEq, Debug)]
|
2015-03-25 17:06:52 -07:00
|
|
|
struct Bar(isize, isize);
|
2013-08-17 22:42:31 +02:00
|
|
|
|
2013-09-25 00:43:37 -07:00
|
|
|
pub fn main() {
|
2015-03-25 17:06:52 -07:00
|
|
|
let f: fn(isize) -> Foo = Foo;
|
|
|
|
let g: fn(isize, isize) -> Bar = Bar;
|
2013-08-18 21:37:40 +02:00
|
|
|
assert_eq!(f(42), Foo(42));
|
|
|
|
assert_eq!(g(4, 7), Bar(4, 7));
|
2013-08-17 22:42:31 +02:00
|
|
|
}
|