1 error[E0308]: mismatched types
2 --> $DIR/issue-59819.rs:28:18
7 | expected i32, found struct `Foo`
8 | help: consider dereferencing the type: `*x`
10 = note: expected type `i32`
13 error[E0308]: mismatched types
14 --> $DIR/issue-59819.rs:30:18
19 | expected i32, found &{integer}
20 | help: consider dereferencing the borrow: `*a`
22 = note: expected type `i32`
23 found type `&{integer}`
25 error[E0308]: mismatched types
26 --> $DIR/issue-59819.rs:34:21
28 LL | let g: String = f;
31 | expected struct `std::string::String`, found struct `Bar`
32 | help: try using a conversion method: `f.to_string()`
34 = note: expected type `std::string::String`
37 error: aborting due to 3 previous errors
39 For more information about this error, try `rustc --explain E0308`.