1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
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() {}