fork/rust
git clone https://git.julia.blue/fork/rust
4560ea788cb
1.39.0
1error[E0308]: mismatched types 2 --> $DIR/conversion-methods.rs:5:41 3 | 4LL | let _tis_an_instants_play: String = "'Tis a fond Ambush—"; 5 | ^^^^^^^^^^^^^^^^^^^^^ 6 | | 7 | expected struct `std::string::String`, found reference 8 | help: try using a conversion method: `"'Tis a fond Ambush—".to_string()` 9 | 10 = note: expected type `std::string::String` 11 found type `&'static str` 12 13error[E0308]: mismatched types 14 --> $DIR/conversion-methods.rs:6:40 15 | 16LL | let _just_to_make_bliss: PathBuf = Path::new("/ern/her/own/surprise"); 17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 18 | | 19 | expected struct `std::path::PathBuf`, found reference 20 | help: try using a conversion method: `Path::new("/ern/her/own/surprise").to_path_buf()` 21 | 22 = note: expected type `std::path::PathBuf` 23 found type `&std::path::Path` 24 25error[E0308]: mismatched types 26 --> $DIR/conversion-methods.rs:9:40 27 | 28LL | let _but_should_the_play: String = 2; // Perhaps surprisingly, we suggest .to_string() here 29 | ^ 30 | | 31 | expected struct `std::string::String`, found integer 32 | help: try using a conversion method: `2.to_string()` 33 | 34 = note: expected type `std::string::String` 35 found type `{integer}` 36 37error[E0308]: mismatched types 38 --> $DIR/conversion-methods.rs:12:47 39 | 40LL | let _prove_piercing_earnest: Vec<usize> = &[1, 2, 3]; 41 | ^^^^^^^^^^ 42 | | 43 | expected struct `std::vec::Vec`, found reference 44 | help: try using a conversion method: `&[1, 2, 3].to_vec()` 45 | 46 = note: expected type `std::vec::Vec<usize>` 47 found type `&[{integer}; 3]` 48 49error: aborting due to 4 previous errors 50 51For more information about this error, try `rustc --explain E0308`.