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");
|
2019-11-18 23:00:24 -06:00
|
|
|
| ------ ^^^^^^^^^^^^^^^^^^
|
|
|
|
| | |
|
2020-09-02 02:40:56 -05:00
|
|
|
| | expected struct `String`, found `&String`
|
2019-11-18 23:00:24 -06:00
|
|
|
| | help: consider removing the borrow: `String::from("a")`
|
|
|
|
| expected due to this
|
2019-03-02 13:25:00 -06:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/format-borrow.rs:4:21
|
|
|
|
|
|
|
|
|
LL | let b: String = &format!("b");
|
2019-11-18 23:00:24 -06:00
|
|
|
| ------ ^^^^^^^^^^^^^
|
|
|
|
| | |
|
2020-09-02 02:40:56 -05:00
|
|
|
| | expected struct `String`, found `&String`
|
2019-11-18 23:00:24 -06:00
|
|
|
| | help: consider removing the borrow: `format!("b")`
|
|
|
|
| expected due to this
|
2019-03-02 13:25:00 -06:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|