| ______________________________________________^
LL | |
LL | | } else {
- | |_____^ expected struct `String`, found `()`
+ | |_____^ expected `String`, found `()`
|
help: consider returning the local binding `s`
|
--> $DIR/return-bindings.rs:14:11
|
LL | fn c() -> Option<i32> {
- | - ^^^^^^^^^^^ expected enum `Option`, found `()`
+ | - ^^^^^^^^^^^ expected `Option<i32>`, found `()`
| |
| implicitly returns `()` as its body has no tail or `return` expression
|
| ______________________________________________^
LL | |
LL | | } else {
- | |_____^ expected struct `String`, found `()`
+ | |_____^ expected `String`, found `()`
|
help: consider returning the local binding `s`
|
LL | | } else {
| |_____- expected because of this
LL | String::new()
- | ^^^^^^^^^^^^^ expected `()`, found struct `String`
+ | ^^^^^^^^^^^^^ expected `()`, found `String`
|
help: consider returning the local binding `s`
|
--> $DIR/return-bindings.rs:37:20
|
LL | Some(s) => {}
- | ^^ expected struct `String`, found `()`
+ | ^^ expected `String`, found `()`
|
help: consider returning the local binding `s`
|
LL | | Some(s) => {}
| | -- this is found to be of type `()`
LL | | None => String::new(),
- | | ^^^^^^^^^^^^^ expected `()`, found struct `String`
+ | | ^^^^^^^^^^^^^ expected `()`, found `String`
LL | |
LL | | };
| |_____- `match` arms have incompatible types