]> git.lizzy.rs Git - rust.git/blob - tests/ui/crashes/if_same_then_else.rs
Merge pull request #3918 from matthiaskrgr/typos
[rust.git] / tests / ui / crashes / if_same_then_else.rs
1 // run-pass
2
3 #![deny(clippy::if_same_then_else)]
4
5 /// Test for https://github.com/rust-lang/rust-clippy/issues/2426
6
7 fn main() {}
8
9 pub fn foo(a: i32, b: i32) -> Option<&'static str> {
10     if a == b {
11         None
12     } else if a > b {
13         Some("a pfeil b")
14     } else {
15         None
16     }
17 }