fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
1.1 KiB39 linesraw
1error[E0308]: mismatched types
2  --> $DIR/issue-59819.rs:28:18
3   |
4LL |     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 type `Foo`
12
13error[E0308]: mismatched types
14  --> $DIR/issue-59819.rs:30:18
15   |
16LL |     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 type `&{integer}`
24
25error[E0308]: mismatched types
26  --> $DIR/issue-59819.rs:34:21
27   |
28LL |     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 type `std::string::String`
35              found type `Bar`
36
37error: aborting due to 3 previous errors
38
39For more information about this error, try `rustc --explain E0308`.