]> git.proxmox.com Git - rustc.git/blame - src/test/ui/suggestions/conversion-methods.stderr
New upstream version 1.28.0+dfsg1
[rustc.git] / src / test / ui / suggestions / conversion-methods.stderr
CommitLineData
2c00a5a8
XL
1error[E0308]: mismatched types
2 --> $DIR/conversion-methods.rs:15:41
3 |
0531ce1d 4LL | let _tis_an_instants_play: String = "'Tis a fond Ambush—"; //~ ERROR mismatched types
2c00a5a8
XL
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:16:40
15 |
0531ce1d 16LL | let _just_to_make_bliss: PathBuf = Path::new("/ern/her/own/surprise");
2c00a5a8
XL
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:19:40
27 |
0531ce1d 28LL | let _but_should_the_play: String = 2; // Perhaps surprisingly, we suggest .to_string() here
2c00a5a8
XL
29 | ^
30 | |
31 | expected struct `std::string::String`, found integral variable
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:22:47
39 |
0531ce1d 40LL | let _prove_piercing_earnest: Vec<usize> = &[1, 2, 3]; //~ ERROR mismatched types
2c00a5a8
XL
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
0531ce1d 51For more information about this error, try `rustc --explain E0308`.