mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
16 lines
262 B
Rust
16 lines
262 B
Rust
struct Foo {
|
|
a: isize,
|
|
b: isize,
|
|
}
|
|
|
|
type Bar = Box<Foo>;
|
|
|
|
fn want_foo(f: Foo) {}
|
|
fn have_bar(b: Bar) {
|
|
want_foo(b); //~ ERROR mismatched types
|
|
//~| expected struct `Foo`
|
|
//~| found struct `Box<Foo>`
|
|
}
|
|
|
|
fn main() {}
|