fork/rust

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

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
1.0 KiB33 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   |            expected due to this
10
11error[E0308]: mismatched types
12  --> $DIR/issue-59819.rs:30:18
13   |
14LL |     let b: i32 = a;
15   |            ---   ^
16   |            |     |
17   |            |     expected `i32`, found `&{integer}`
18   |            |     help: consider dereferencing the borrow: `*a`
19   |            expected due to this
20
21error[E0308]: mismatched types
22  --> $DIR/issue-59819.rs:34:21
23   |
24LL |     let g: String = f;
25   |            ------   ^
26   |            |        |
27   |            |        expected struct `std::string::String`, found struct `Bar`
28   |            |        help: try using a conversion method: `f.to_string()`
29   |            expected due to this
30
31error: aborting due to 3 previous errors
32
33For more information about this error, try `rustc --explain E0308`.