rust/tests/ui/terr-sorts.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
262 B
Rust
Raw Normal View History

struct Foo {
a: isize,
b: isize,
2013-03-07 03:09:17 +00:00
}
type Bar = Box<Foo>;
2012-04-06 13:58:41 +00:00
fn want_foo(f: Foo) {}
fn have_bar(b: Bar) {
2015-01-12 06:01:44 +00:00
want_foo(b); //~ ERROR mismatched types
//~| expected struct `Foo`
//~| found struct `Box<Foo>`
2012-04-06 13:58:41 +00:00
}
fn main() {}