]> git.lizzy.rs Git - rust.git/blob - src/test/ui/terr-in-field.rs
Merge commit 'd3a2366ee877075c59b38bd8ced55f224fc7ef51' into sync_cg_clif-2022-07-26
[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 struct `Foo`, found struct `Bar`
15 }
16
17 fn main() {}