]> git.lizzy.rs Git - rust.git/blob - tests/ui/crashes/if_same_then_else.rs
Auto merge of #3744 - phansch:fix3144, r=oli-obk
[rust.git] / tests / ui / crashes / if_same_then_else.rs
1 #![deny(clippy::if_same_then_else)]
2
3 /// Test for https://github.com/rust-lang/rust-clippy/issues/2426
4
5 fn main() {}
6
7 pub fn foo(a: i32, b: i32) -> Option<&'static str> {
8     if a == b {
9         None
10     } else if a > b {
11         Some("a pfeil b")
12     } else {
13         None
14     }
15 }