about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorMax Baumann <max@bmn.dev>2022-03-20 23:43:17 +0100
committerMax Baumann <max@bmn.dev>2022-03-20 23:43:17 +0100
commit0f83753934b84efb6b3263270f625f0f44c208f2 (patch)
treec20f965d75152ea8d60f59ff94eb50ff6556ee11 /tests
parent20c352a4f602d541920fe1745b117fc8b42ca8fc (diff)
downloadrust-0f83753934b84efb6b3263270f625f0f44c208f2.tar.gz
rust-0f83753934b84efb6b3263270f625f0f44c208f2.zip
feat: change error message
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/or_then_unwrap.stderr6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/ui/or_then_unwrap.stderr b/tests/ui/or_then_unwrap.stderr
index 6b32634defd..da88154c59f 100644
--- a/tests/ui/or_then_unwrap.stderr
+++ b/tests/ui/or_then_unwrap.stderr
@@ -1,4 +1,4 @@
-error: .or(Some(…)).unwrap() found
+error: found `.or(Some(…)).unwrap()`
   --> $DIR/or_then_unwrap.rs:24:20
    |
 LL |     let _ = option.or(Some("fallback")).unwrap(); // should trigger lint
@@ -6,13 +6,13 @@ LL |     let _ = option.or(Some("fallback")).unwrap(); // should trigger lint
    |
    = note: `-D clippy::or-then-unwrap` implied by `-D warnings`
 
-error: .or(Ok(…)).unwrap() found
+error: found `.or(Ok(…)).unwrap()`
   --> $DIR/or_then_unwrap.rs:27:20
    |
 LL |     let _ = result.or::<&str>(Ok("fallback")).unwrap(); // should trigger lint
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or("fallback")`
 
-error: .or(Some(…)).unwrap() found
+error: found `.or(Some(…)).unwrap()`
   --> $DIR/or_then_unwrap.rs:31:31
    |
 LL |     let _ = option.map(|v| v).or(Some("fallback")).unwrap().to_string().chars(); // should trigger lint