help: remove `Option` from the return type...
|
LL | fn func1(a: bool, b: bool) -> i32 {
- | ^^^
+ | ~~~
help: ...and then change returning expressions
|
-LL | return 42;
+LL ~ return 42;
LL | }
LL | if a {
LL | Some(-1);
-LL | 2
+LL ~ 2
LL | } else {
...
help: remove `Option` from the return type...
|
LL | fn func2(a: bool, b: bool) -> i32 {
- | ^^^
+ | ~~~
help: ...and then change returning expressions
|
-LL | return 10;
+LL ~ return 10;
LL | }
-LL | if a { 20 } else { 30 }
+LL ~ if a { 20 } else { 30 }
|
error: this function's return value is unnecessarily wrapped by `Option`
help: remove `Option` from the return type...
|
LL | fn func5() -> i32 {
- | ^^^
+ | ~~~
help: ...and then change returning expressions
|
LL | 1
help: remove `Result` from the return type...
|
LL | fn func7() -> i32 {
- | ^^^
+ | ~~~
help: ...and then change returning expressions
|
LL | 1
help: remove `Option` from the return type...
|
LL | fn func12() -> i32 {
- | ^^^
+ | ~~~
help: ...and then change returning expressions
|
LL | 1
help: remove the return type...
|
LL | fn issue_6640_1(a: bool, b: bool) -> Option<()> {
- | ^^^^^^^^^^
+ | ~~~~~~~~~~
help: ...and then remove returned values
|
-LL | return ;
+LL ~ return ;
LL | }
LL | if a {
LL | Some(());
-LL |
+LL ~
LL | } else {
...
help: remove the return type...
|
LL | fn issue_6640_2(a: bool, b: bool) -> Result<(), i32> {
- | ^^^^^^^^^^^^^^^
+ | ~~~~~~~~~~~~~~~
help: ...and then remove returned values
|
-LL | return ;
+LL ~ return ;
LL | }
LL | if a {
-LL |
+LL ~
LL | } else {
-LL | return ;
+LL ~ return ;
|
error: aborting due to 7 previous errors