mirror of
https://github.com/rust-lang/rust
synced 2024-09-06 01:11:17 +00:00
![jyn](/assets/img/avatar_default.png)
to avoid going over the existing limit now that the ui-fulldeps tests have been moved to ui.
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() {}
|