]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/unwrap_or.stderr
Auto merge of #3603 - xfix:random-state-lint, r=phansch
[rust.git] / tests / ui / unwrap_or.stderr
index 2432b7970f63ae0625e15adf06e2480ee3d054b2..3970b68de7ad40e3f5b1a84d7ffc1f8e333f7138 100644 (file)
@@ -1,7 +1,7 @@
 error: use of `unwrap_or` followed by a function call
   --> $DIR/unwrap_or.rs:13:47
    |
-13 |     let s = Some(String::from("test string")).unwrap_or("Fail".to_string()).len();
+LL |     let s = Some(String::from("test string")).unwrap_or("Fail".to_string()).len();
    |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "Fail".to_string())`
    |
    = note: `-D clippy::or-fun-call` implied by `-D warnings`
@@ -9,7 +9,7 @@ error: use of `unwrap_or` followed by a function call
 error: use of `unwrap_or` followed by a function call
   --> $DIR/unwrap_or.rs:17:47
    |
-17 |     let s = Some(String::from("test string")).unwrap_or("Fail".to_string()).len();
+LL |     let s = Some(String::from("test string")).unwrap_or("Fail".to_string()).len();
    |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "Fail".to_string())`
 
 error: aborting due to 2 previous errors