1 error[E0308]: mismatched types
2 --> $DIR/conversion-methods.rs:5:41
4 LL | let _tis_an_instants_play: String = "'Tis a fond Ambush—";
5 | ^^^^^^^^^^^^^^^^^^^^^
7 | expected struct `std::string::String`, found &str
8 | help: try using a conversion method: `"'Tis a fond Ambush—".to_string()`
10 error[E0308]: mismatched types
11 --> $DIR/conversion-methods.rs:6:40
13 LL | let _just_to_make_bliss: PathBuf = Path::new("/ern/her/own/surprise");
14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16 | expected struct `std::path::PathBuf`, found &std::path::Path
17 | help: try using a conversion method: `Path::new("/ern/her/own/surprise").to_path_buf()`
19 error[E0308]: mismatched types
20 --> $DIR/conversion-methods.rs:9:40
22 LL | let _but_should_the_play: String = 2; // Perhaps surprisingly, we suggest .to_string() here
25 | expected struct `std::string::String`, found integer
26 | help: try using a conversion method: `2.to_string()`
28 error[E0308]: mismatched types
29 --> $DIR/conversion-methods.rs:12:47
31 LL | let _prove_piercing_earnest: Vec<usize> = &[1, 2, 3];
34 | expected struct `std::vec::Vec`, found &[{integer}; 3]
35 | help: try using a conversion method: `(&[1, 2, 3]).to_vec()`
37 = note: expected struct `std::vec::Vec<usize>`
38 found reference `&[{integer}; 3]`
40 error: aborting due to 4 previous errors
42 For more information about this error, try `rustc --explain E0308`.