rust/src/test/ui/terr-sorts.rs

16 lines
274 B
Rust
Raw Normal View History

struct Foo {
a: isize,
b: isize,
2013-03-06 19:09:17 -08:00
}
type Bar = Box<Foo>;
2012-04-06 06:58:41 -07: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
//~| expected struct `Foo`
//~| found struct `std::boxed::Box<Foo>`
2012-04-06 06:58:41 -07:00
}
fn main() {}