@@ -2,10 +2,11 @@ error[E0308]: mismatched types
2
2
--> $DIR/conversion-methods.rs:5:41
3
3
|
4
4
LL | 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()`
5
+ | ------ ^^^^^^^^^^^^^^^^^^^^^
6
+ | | |
7
+ | | expected struct `std::string::String`, found reference
8
+ | | help: try using a conversion method: `"'Tis a fond Ambush—".to_string()`
9
+ | expected due to this
9
10
|
10
11
= note: expected type `std::string::String`
11
12
found type `&'static str`
@@ -14,10 +15,11 @@ error[E0308]: mismatched types
14
15
--> $DIR/conversion-methods.rs:6:40
15
16
|
16
17
LL | 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()`
18
+ | ------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19
+ | | |
20
+ | | expected struct `std::path::PathBuf`, found reference
21
+ | | help: try using a conversion method: `Path::new("/ern/her/own/surprise").to_path_buf()`
22
+ | expected due to this
21
23
|
22
24
= note: expected type `std::path::PathBuf`
23
25
found type `&std::path::Path`
@@ -26,10 +28,11 @@ error[E0308]: mismatched types
26
28
--> $DIR/conversion-methods.rs:9:40
27
29
|
28
30
LL | 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()`
31
+ | ------ ^
32
+ | | |
33
+ | | expected struct `std::string::String`, found integer
34
+ | | help: try using a conversion method: `2.to_string()`
35
+ | expected due to this
33
36
|
34
37
= note: expected type `std::string::String`
35
38
found type `{integer}`
@@ -38,10 +41,11 @@ error[E0308]: mismatched types
38
41
--> $DIR/conversion-methods.rs:12:47
39
42
|
40
43
LL | 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()`
44
+ | ---------- ^^^^^^^^^^
45
+ | | |
46
+ | | expected struct `std::vec::Vec`, found reference
47
+ | | help: try using a conversion method: `(&[1, 2, 3]).to_vec()`
48
+ | expected due to this
45
49
|
46
50
= note: expected type `std::vec::Vec<usize>`
47
51
found type `&[{integer}; 3]`
0 commit comments