]>
Commit | Line | Data |
---|---|---|
532ac7d7 XL |
1 | error[E0308]: mismatched types |
2 | --> $DIR/format-borrow.rs:2:21 | |
3 | | | |
4 | LL | let a: String = &String::from("a"); | |
94222f64 XL |
5 | | ------ ^^^^^^^^^^^^^^^^^^ expected struct `String`, found `&String` |
6 | | | | |
60c5eb7d | 7 | | expected due to this |
94222f64 XL |
8 | | |
9 | help: consider removing the borrow | |
10 | | | |
11 | LL - let a: String = &String::from("a"); | |
12 | LL + let a: String = String::from("a"); | |
923072b8 | 13 | | |
532ac7d7 XL |
14 | |
15 | error[E0308]: mismatched types | |
16 | --> $DIR/format-borrow.rs:4:21 | |
17 | | | |
18 | LL | let b: String = &format!("b"); | |
94222f64 XL |
19 | | ------ ^^^^^^^^^^^^^ expected struct `String`, found `&String` |
20 | | | | |
60c5eb7d | 21 | | expected due to this |
94222f64 XL |
22 | | |
23 | help: consider removing the borrow | |
24 | | | |
25 | LL - let b: String = &format!("b"); | |
26 | LL + let b: String = format!("b"); | |
923072b8 | 27 | | |
532ac7d7 | 28 | |
17df50a5 XL |
29 | error[E0308]: mismatched types |
30 | --> $DIR/format-borrow.rs:6:21 | |
31 | | | |
32 | LL | let c: String = &mut format!("c"); | |
94222f64 XL |
33 | | ------ ^^^^^^^^^^^^^^^^^ expected struct `String`, found `&mut String` |
34 | | | | |
17df50a5 | 35 | | expected due to this |
94222f64 XL |
36 | | |
37 | help: consider removing the borrow | |
38 | | | |
39 | LL - let c: String = &mut format!("c"); | |
40 | LL + let c: String = format!("c"); | |
923072b8 | 41 | | |
17df50a5 XL |
42 | |
43 | error[E0308]: mismatched types | |
44 | --> $DIR/format-borrow.rs:8:21 | |
45 | | | |
46 | LL | let d: String = &mut (format!("d")); | |
94222f64 XL |
47 | | ------ ^^^^^^^^^^^^^^^^^^^ expected struct `String`, found `&mut String` |
48 | | | | |
17df50a5 | 49 | | expected due to this |
94222f64 XL |
50 | | |
51 | help: consider removing the borrow | |
52 | | | |
53 | LL - let d: String = &mut (format!("d")); | |
54 | LL + let d: String = format!("d")); | |
923072b8 | 55 | | |
17df50a5 XL |
56 | |
57 | error: aborting due to 4 previous errors | |
532ac7d7 XL |
58 | |
59 | For more information about this error, try `rustc --explain E0308`. |