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
244 B
Rust
Raw Normal View History

struct Foo {
a: isize,
b: isize,
2013-03-06 21:09:17 -06:00
}
struct Bar {
a: isize,
b: usize,
2013-03-06 21:09:17 -06:00
}
2012-04-06 08:58:41 -05:00
fn want_foo(f: Foo) {}
fn have_bar(b: Bar) {
2015-01-12 00:01:44 -06:00
want_foo(b); //~ ERROR mismatched types
//~| expected `Foo`, found `Bar`
2012-04-06 08:58:41 -05:00
}
fn main() {}