about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/unnecessary_wraps.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/unnecessary_wraps.stderr')
-rw-r--r--src/tools/clippy/tests/ui/unnecessary_wraps.stderr44
1 files changed, 27 insertions, 17 deletions
diff --git a/src/tools/clippy/tests/ui/unnecessary_wraps.stderr b/src/tools/clippy/tests/ui/unnecessary_wraps.stderr
index b304d4dce6e..b06ab91dc8d 100644
--- a/src/tools/clippy/tests/ui/unnecessary_wraps.stderr
+++ b/src/tools/clippy/tests/ui/unnecessary_wraps.stderr
@@ -13,8 +13,9 @@ LL | | }
    = help: to override `-D warnings` add `#[allow(clippy::unnecessary_wraps)]`
 help: remove `Option` from the return type...
    |
-LL | fn func1(a: bool, b: bool) -> i32 {
-   |                               ~~~
+LL - fn func1(a: bool, b: bool) -> Option<i32> {
+LL + fn func1(a: bool, b: bool) -> i32 {
+   |
 help: ...and then change returning expressions
    |
 LL ~         return 42;
@@ -40,8 +41,9 @@ LL | | }
    |
 help: remove `Option` from the return type...
    |
-LL | fn func2(a: bool, b: bool) -> i32 {
-   |                               ~~~
+LL - fn func2(a: bool, b: bool) -> Option<i32> {
+LL + fn func2(a: bool, b: bool) -> i32 {
+   |
 help: ...and then change returning expressions
    |
 LL ~         return 10;
@@ -60,11 +62,13 @@ LL | | }
    |
 help: remove `Option` from the return type...
    |
-LL | fn func5() -> i32 {
-   |               ~~~
+LL - fn func5() -> Option<i32> {
+LL + fn func5() -> i32 {
+   |
 help: ...and then change returning expressions
    |
-LL |     1
+LL -     Some(1)
+LL +     1
    |
 
 error: this function's return value is unnecessarily wrapped by `Result`
@@ -78,11 +82,13 @@ LL | | }
    |
 help: remove `Result` from the return type...
    |
-LL | fn func7() -> i32 {
-   |               ~~~
+LL - fn func7() -> Result<i32, ()> {
+LL + fn func7() -> i32 {
+   |
 help: ...and then change returning expressions
    |
-LL |     1
+LL -     Ok(1)
+LL +     1
    |
 
 error: this function's return value is unnecessarily wrapped by `Option`
@@ -96,11 +102,13 @@ LL | |     }
    |
 help: remove `Option` from the return type...
    |
-LL |     fn func12() -> i32 {
-   |                    ~~~
+LL -     fn func12() -> Option<i32> {
+LL +     fn func12() -> i32 {
+   |
 help: ...and then change returning expressions
    |
-LL |         1
+LL -         Some(1)
+LL +         1
    |
 
 error: this function's return value is unnecessary
@@ -116,8 +124,9 @@ LL | | }
    |
 help: remove the return type...
    |
-LL | fn issue_6640_1(a: bool, b: bool) -> () {
-   |                                      ~~
+LL - fn issue_6640_1(a: bool, b: bool) -> Option<()> {
+LL + fn issue_6640_1(a: bool, b: bool) -> () {
+   |
 help: ...and then remove returned values
    |
 LL ~         return ;
@@ -142,8 +151,9 @@ LL | | }
    |
 help: remove the return type...
    |
-LL | fn issue_6640_2(a: bool, b: bool) -> () {
-   |                                      ~~
+LL - fn issue_6640_2(a: bool, b: bool) -> Result<(), i32> {
+LL + fn issue_6640_2(a: bool, b: bool) -> () {
+   |
 help: ...and then remove returned values
    |
 LL ~         return ;