2018-12-16 21:21:47 -06:00
|
|
|
struct Foo {
|
2015-01-08 04:54:35 -06:00
|
|
|
a: isize,
|
|
|
|
b: isize,
|
2013-03-06 21:09:17 -06:00
|
|
|
}
|
|
|
|
|
2018-12-16 21:21:47 -06:00
|
|
|
struct Bar {
|
2015-01-08 04:54:35 -06:00
|
|
|
a: isize,
|
2015-01-08 05:02:42 -06:00
|
|
|
b: usize,
|
2013-03-06 21:09:17 -06:00
|
|
|
}
|
2012-04-06 08:58:41 -05:00
|
|
|
|
2018-12-16 21:21:47 -06:00
|
|
|
fn want_foo(f: Foo) {}
|
|
|
|
fn have_bar(b: Bar) {
|
2015-01-12 00:01:44 -06:00
|
|
|
want_foo(b); //~ ERROR mismatched types
|
2023-01-02 20:00:33 -06:00
|
|
|
//~| expected `Foo`, found `Bar`
|
2012-04-06 08:58:41 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|