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.0 KiB27 linesraw
1error[E0308]: mismatched types
2  --> $DIR/issue-53692.rs:4:37
3   |
4LL |         let items_clone: Vec<i32> = ref_items.clone();
5   |                                     ^^^^^^^^^^^^^^^^^
6   |                                     |
7   |                                     expected struct `std::vec::Vec`, found &[i32]
8   |                                     help: try using a conversion method: `ref_items.to_vec()`
9   |
10   = note: expected type `std::vec::Vec<i32>`
11              found type `&[i32]`
12
13error[E0308]: mismatched types
14  --> $DIR/issue-53692.rs:11:30
15   |
16LL |         let string: String = s.clone();
17   |                              ^^^^^^^^^
18   |                              |
19   |                              expected struct `std::string::String`, found &str
20   |                              help: try using a conversion method: `s.to_string()`
21   |
22   = note: expected type `std::string::String`
23              found type `&str`
24
25error: aborting due to 2 previous errors
26
27For more information about this error, try `rustc --explain E0308`.