]>
Commit | Line | Data |
---|---|---|
cdc7bbd5 XL |
1 | error[E0308]: `if` and `else` have incompatible types |
2 | --> $DIR/issue-83943.rs:7:9 | |
3 | | | |
4 | LL | / if true { | |
5 | LL | | "A".to_string() | |
6 | | | --------------- expected because of this | |
7 | LL | | } else { | |
8 | LL | | "B" | |
94222f64 | 9 | | | ^^^- help: try using a conversion method: `.to_string()` |
cdc7bbd5 | 10 | | | | |
9ffffee4 | 11 | | | expected `String`, found `&str` |
cdc7bbd5 XL |
12 | LL | | }; |
13 | | |_____- `if` and `else` have incompatible types | |
14 | ||
4b012472 | 15 | error: aborting due to 1 previous error |
cdc7bbd5 XL |
16 | |
17 | For more information about this error, try `rustc --explain E0308`. |