2018-12-16 22:21:47 -05:00
|
|
|
struct Foo {
|
2015-01-08 21:54:35 +11:00
|
|
|
a: isize,
|
|
|
|
b: isize,
|
2013-03-06 19:09:17 -08:00
|
|
|
}
|
|
|
|
|
2018-12-16 22:21:47 -05:00
|
|
|
type Bar = Box<Foo>;
|
2012-04-06 06:58:41 -07:00
|
|
|
|
2018-12-16 22:21:47 -05:00
|
|
|
fn want_foo(f: Foo) {}
|
|
|
|
fn have_bar(b: Bar) {
|
2015-01-12 01:01:44 -05:00
|
|
|
want_foo(b); //~ ERROR mismatched types
|
2019-11-13 14:16:56 -08:00
|
|
|
//~| expected struct `Foo`
|
|
|
|
//~| found struct `std::boxed::Box<Foo>`
|
2012-04-06 06:58:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|