// option. This file may not be copied, modified, or distributed
// except according to those terms.
-
-
-
-
#![warn(clippy::implicit_return)]
fn test_end_of_fn() -> bool {
}
#[allow(clippy::match_bool)]
+#[rustfmt::skip]
fn test_match(x: bool) -> bool {
match x {
true => false,
- false => {
- true
- }
+ false => { true },
}
}
}
}
+#[allow(clippy::never_loop)]
+fn test_loop_with_block() -> bool {
+ loop {
+ {
+ break true;
+ }
+ }
+}
+
+#[allow(clippy::never_loop)]
+fn test_loop_with_nests() -> bool {
+ loop {
+ if true {
+ break true;
+ } else {
+ let _ = true;
+ }
+ }
+}
+
fn test_closure() {
- let _ = || {
- true
- };
+ #[rustfmt::skip]
+ let _ = || { true };
let _ = || true;
}
let _ = test_if_block();
let _ = test_match(true);
let _ = test_loop();
+ let _ = test_loop_with_block();
+ let _ = test_loop_with_nests();
test_closure();
}