mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-18 09:03:18 +00:00
a586f52a0f
This should give us more UI coverage for free. It also removes the `run-pass` suite, so we now only have the `ui` suite.
15 lines
282 B
Rust
15 lines
282 B
Rust
#![deny(clippy::if_same_then_else)]
|
|
|
|
/// Test for https://github.com/rust-lang/rust-clippy/issues/2426
|
|
|
|
fn main() {}
|
|
|
|
pub fn foo(a: i32, b: i32) -> Option<&'static str> {
|
|
if a == b {
|
|
None
|
|
} else if a > b {
|
|
Some("a pfeil b")
|
|
} else {
|
|
None
|
|
}
|
|
}
|