blob: d623ac7e0200820de7ee1d5e62d02d91efaba023 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#![warn(clippy::ifs_same_cond)]
#![allow(clippy::if_same_then_else, clippy::comparison_chain)]
fn main() {}
fn issue10272() {
use std::cell::Cell;
// Because the `ignore-interior-mutability` configuration
// is set to ignore for `std::cell::Cell`, the following `get()` calls
// should trigger warning
let x = Cell::new(true);
if x.get() {
} else if !x.take() {
} else if x.get() {
} else {
}
}
|