]>
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"); | |
60c5eb7d XL |
5 | | ------ ^^^^^^^^^^^^^^^^^^ |
6 | | | | | |
7 | | | expected struct `std::string::String`, found `&std::string::String` | |
8 | | | help: consider removing the borrow: `String::from("a")` | |
9 | | expected due to this | |
532ac7d7 XL |
10 | |
11 | error[E0308]: mismatched types | |
12 | --> $DIR/format-borrow.rs:4:21 | |
13 | | | |
14 | LL | let b: String = &format!("b"); | |
60c5eb7d XL |
15 | | ------ ^^^^^^^^^^^^^ |
16 | | | | | |
17 | | | expected struct `std::string::String`, found `&std::string::String` | |
18 | | | help: consider removing the borrow: `format!("b")` | |
19 | | expected due to this | |
532ac7d7 XL |
20 | |
21 | error: aborting due to 2 previous errors | |
22 | ||
23 | For more information about this error, try `rustc --explain E0308`. |