1 error[E0308]: mismatched types
2 --> $DIR/issue-59819.rs:28:18
5 | --- ^ expected `i32`, found struct `Foo`
9 help: consider dereferencing the type
14 error[E0308]: mismatched types
15 --> $DIR/issue-59819.rs:30:18
18 | --- ^ expected `i32`, found `&{integer}`
20 | expected due to this
22 help: consider dereferencing the borrow
27 error[E0308]: mismatched types
28 --> $DIR/issue-59819.rs:34:21
30 LL | let g: String = f;
31 | ------ ^- help: try using a conversion method: `.to_string()`
33 | | expected struct `String`, found struct `Bar`
34 | expected due to this
36 error: aborting due to 3 previous errors
38 For more information about this error, try `rustc --explain E0308`.