]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/issue-59819.stderr
b04ab374f0f0ff2275faa41ba6b2284f8a4d85e5
[rust.git] / src / test / ui / suggestions / issue-59819.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-59819.rs:28:18
3    |
4 LL |     let y: i32 = x;
5    |                  ^
6    |                  |
7    |                  expected i32, found struct `Foo`
8    |                  help: consider dereferencing the type: `*x`
9    |
10    = note: expected type `i32`
11             found struct `Foo`
12
13 error[E0308]: mismatched types
14   --> $DIR/issue-59819.rs:30:18
15    |
16 LL |     let b: i32 = a;
17    |                  ^
18    |                  |
19    |                  expected i32, found &{integer}
20    |                  help: consider dereferencing the borrow: `*a`
21    |
22    = note:   expected type `i32`
23            found reference `&{integer}`
24
25 error[E0308]: mismatched types
26   --> $DIR/issue-59819.rs:34:21
27    |
28 LL |     let g: String = f;
29    |                     ^
30    |                     |
31    |                     expected struct `std::string::String`, found struct `Bar`
32    |                     help: try using a conversion method: `f.to_string()`
33    |
34    = note: expected struct `std::string::String`
35               found struct `Bar`
36
37 error: aborting due to 3 previous errors
38
39 For more information about this error, try `rustc --explain E0308`.