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