diff options
Diffstat (limited to 'src/tools/clippy/tests/ui/question_mark.rs')
-rw-r--r-- | src/tools/clippy/tests/ui/question_mark.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/question_mark.rs b/src/tools/clippy/tests/ui/question_mark.rs index 9ae0d8882..d057df6a9 100644 --- a/src/tools/clippy/tests/ui/question_mark.rs +++ b/src/tools/clippy/tests/ui/question_mark.rs @@ -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) } |