1
Fork 0
rust/tests/ui/terr-in-field.rs

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

18 lines
258 B
Rust
Raw Normal View History

struct Foo {
a: isize,
b: isize,
2013-03-06 19:09:17 -08:00
}
struct Bar {
a: isize,
b: usize,
2013-03-06 19:09:17 -08:00
}
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 `Bar`
2012-04-06 06:58:41 -07:00
}
fn main() {}