1 error[E0308]: mismatched types
2 --> $DIR/format-borrow.rs:2:21
4 LL | let a: String = &String::from("a");
5 | ------ ^^^^^^^^^^^^^^^^^^ expected struct `String`, found `&String`
9 help: consider removing the borrow
11 LL - let a: String = &String::from("a");
12 LL + let a: String = String::from("a");
15 error[E0308]: mismatched types
16 --> $DIR/format-borrow.rs:4:21
18 LL | let b: String = &format!("b");
19 | ------ ^^^^^^^^^^^^^ expected struct `String`, found `&String`
21 | expected due to this
23 help: consider removing the borrow
25 LL - let b: String = &format!("b");
26 LL + let b: String = format!("b");
29 error[E0308]: mismatched types
30 --> $DIR/format-borrow.rs:6:21
32 LL | let c: String = &mut format!("c");
33 | ------ ^^^^^^^^^^^^^^^^^ expected struct `String`, found `&mut String`
35 | expected due to this
37 help: consider removing the borrow
39 LL - let c: String = &mut format!("c");
40 LL + let c: String = format!("c");
43 error[E0308]: mismatched types
44 --> $DIR/format-borrow.rs:8:21
46 LL | let d: String = &mut (format!("d"));
47 | ------ ^^^^^^^^^^^^^^^^^^^ expected struct `String`, found `&mut String`
49 | expected due to this
51 help: consider removing the borrow
53 LL - let d: String = &mut (format!("d"));
54 LL + let d: String = format!("d"));
57 error: aborting due to 4 previous errors
59 For more information about this error, try `rustc --explain E0308`.