mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
62ba3e70a1
The previous output was unintuitive to users.
18 lines
244 B
Rust
18 lines
244 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 `Foo`, found `Bar`
|
|
}
|
|
|
|
fn main() {}
|