]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/question_mark.rs
Merge commit 'f4850f7292efa33759b4f7f9b7621268979e9914' into clippyup
[rust.git] / src / tools / clippy / tests / ui / question_mark.rs
index 9ae0d88829af55cb91d387cadd0bc84a83a119e8..d057df6a9b35de793d2954b89dfedd0be6878c45 100644 (file)
@@ -166,6 +166,9 @@ fn result_func(x: Result<i32, i32>) -> Result<i32, i32> {
         return func_returning_result();
     }
 
+    // no warning
+    let _ = if let Err(e) = x { Err(e) } else { Ok(0) };
+
     Ok(y)
 }