summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/result_map_or_into_option.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/result_map_or_into_option.stderr')
-rw-r--r--src/tools/clippy/tests/ui/result_map_or_into_option.stderr16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/tools/clippy/tests/ui/result_map_or_into_option.stderr b/src/tools/clippy/tests/ui/result_map_or_into_option.stderr
index 9396ea4c0..3d6bfef48 100644
--- a/src/tools/clippy/tests/ui/result_map_or_into_option.stderr
+++ b/src/tools/clippy/tests/ui/result_map_or_into_option.stderr
@@ -1,4 +1,4 @@
-error: called `map_or(None, Some)` on a `Result` value. This can be done more directly by calling `ok()` instead
+error: called `map_or(None, Some)` on a `Result` value
--> $DIR/result_map_or_into_option.rs:5:13
|
LL | let _ = opt.map_or(None, Some);
@@ -7,5 +7,17 @@ LL | let _ = opt.map_or(None, Some);
= note: `-D clippy::result-map-or-into-option` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::result_map_or_into_option)]`
-error: aborting due to previous error
+error: called `map_or_else(|_| None, Some)` on a `Result` value
+ --> $DIR/result_map_or_into_option.rs:7:13
+ |
+LL | let _ = opt.map_or_else(|_| None, Some);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try using `ok` instead: `opt.ok()`
+
+error: called `map_or_else(|_| None, Some)` on a `Result` value
+ --> $DIR/result_map_or_into_option.rs:10:13
+ |
+LL | let _ = opt.map_or_else(|_| { None }, Some);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try using `ok` instead: `opt.ok()`
+
+error: aborting due to 3 previous errors