mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
18 lines
258 B
Rust
18 lines
258 B
Rust
struct Foo {
|
|
a: isize,
|
|
b: isize,
|
|
}
|
|
|
|
struct Bar {
|
|
a: isize,
|
|
b: usize,
|
|
}
|
|
|
|
fn want_foo(f: Foo) {}
|
|
fn have_bar(b: Bar) {
|
|
want_foo(b); //~ ERROR mismatched types
|
|
//~| expected struct `Foo`, found struct `Bar`
|
|
}
|
|
|
|
fn main() {}
|