]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/clippy/tests/ui/result_map_unit_fn_fixable.stderr
New upstream version 1.62.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / result_map_unit_fn_fixable.stderr
index 4f3a8c6b7923986359d770df58bdc6e530410983..782febd52644128e0e7e18e4c1f4316efbb33b9e 100644 (file)
@@ -136,5 +136,13 @@ LL |     x.field.map(|ref value| { do_nothing(value + captured) });
    |     |
    |     help: try this: `if let Ok(ref value) = x.field { do_nothing(value + captured) }`
 
-error: aborting due to 17 previous errors
+error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
+  --> $DIR/result_map_unit_fn_fixable.rs:79:5
+   |
+LL |     x.field.map(|value| println!("{:?}", value));
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
+   |     |
+   |     help: try this: `if let Ok(value) = x.field { println!("{:?}", value) }`
+
+error: aborting due to 18 previous errors