]> git.lizzy.rs Git - rust.git/blob - src/test/ui/terr-in-field.rs
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / terr-in-field.rs
1 struct Foo {
2     a: isize,
3     b: isize,
4 }
5
6 struct Bar {
7     a: isize,
8     b: usize,
9 }
10
11 fn want_foo(f: Foo) {}
12 fn have_bar(b: Bar) {
13     want_foo(b); //~  ERROR mismatched types
14                  //~| expected type `Foo`
15                  //~| found type `Bar`
16                  //~| expected struct `Foo`, found struct `Bar`
17 }
18
19 fn main() {}