2019-03-02 13:25:00 -06:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/format-borrow.rs:2:21
|
|
|
|
|
|
|
|
|
LL | let a: String = &String::from("a");
|
2021-06-28 13:22:47 -05:00
|
|
|
| ------ ^^^^^^^^^^^^^^^^^^ expected struct `String`, found `&String`
|
|
|
|
| |
|
2019-11-18 23:00:24 -06:00
|
|
|
| expected due to this
|
2021-06-28 13:22:47 -05:00
|
|
|
|
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
|
|
|
|
LL | let a: String = String::from("a");
|
|
|
|
| --
|
2019-03-02 13:25:00 -06:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/format-borrow.rs:4:21
|
|
|
|
|
|
|
|
|
LL | let b: String = &format!("b");
|
2021-06-28 13:22:47 -05:00
|
|
|
| ------ ^^^^^^^^^^^^^ expected struct `String`, found `&String`
|
|
|
|
| |
|
2019-11-18 23:00:24 -06:00
|
|
|
| expected due to this
|
2021-06-28 13:22:47 -05:00
|
|
|
|
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
|
|
|
|
LL | let b: String = format!("b");
|
|
|
|
| --
|
2019-03-02 13:25:00 -06:00
|
|
|
|
2021-06-02 12:06:45 -05:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/format-borrow.rs:6:21
|
|
|
|
|
|
|
|
|
LL | let c: String = &mut format!("c");
|
2021-06-28 13:22:47 -05:00
|
|
|
| ------ ^^^^^^^^^^^^^^^^^ expected struct `String`, found `&mut String`
|
|
|
|
| |
|
2021-06-02 12:06:45 -05:00
|
|
|
| expected due to this
|
2021-06-28 13:22:47 -05:00
|
|
|
|
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
|
|
|
|
LL | let c: String = format!("c");
|
|
|
|
| --
|
2021-06-02 12:06:45 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/format-borrow.rs:8:21
|
|
|
|
|
|
|
|
|
LL | let d: String = &mut (format!("d"));
|
2021-06-28 13:22:47 -05:00
|
|
|
| ------ ^^^^^^^^^^^^^^^^^^^ expected struct `String`, found `&mut String`
|
|
|
|
| |
|
2021-06-02 12:06:45 -05:00
|
|
|
| expected due to this
|
2021-06-28 13:22:47 -05:00
|
|
|
|
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
|
|
|
|
LL | let d: String = format!("d"));
|
|
|
|
| --
|
2021-06-02 12:06:45 -05:00
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
2019-03-02 13:25:00 -06:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|