mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 07:00:55 +00:00
b545f1c3bb
compiletest UI tests do not fail when encountering panics and ICEs unless the `// run-pass` flag is used. (This was forgotten in https://github.com/rust-lang/rust-clippy/pull/3743)
17 lines
295 B
Rust
17 lines
295 B
Rust
// run-pass
|
|
|
|
#![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
|
|
}
|
|
}
|