diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:06:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:06:37 +0000 |
commit | 246f239d9f40f633160f0c18f87a20922d4e77bb (patch) | |
tree | 5a88572663584b3d4d28e5a20e10abab1be40884 /src/tools/clippy/tests/ui/logic_bug.rs | |
parent | Releasing progress-linux version 1.64.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-246f239d9f40f633160f0c18f87a20922d4e77bb.tar.xz rustc-246f239d9f40f633160f0c18f87a20922d4e77bb.zip |
Merging debian version 1.65.0+dfsg1-2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/clippy/tests/ui/logic_bug.rs')
-rw-r--r-- | src/tools/clippy/tests/ui/logic_bug.rs | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/tools/clippy/tests/ui/logic_bug.rs b/src/tools/clippy/tests/ui/logic_bug.rs deleted file mode 100644 index dd6b1db5f..000000000 --- a/src/tools/clippy/tests/ui/logic_bug.rs +++ /dev/null @@ -1,34 +0,0 @@ -#![feature(lint_reasons)] -#![allow(unused, clippy::diverging_sub_expression)] -#![warn(clippy::logic_bug)] - -fn main() { - let a: bool = unimplemented!(); - let b: bool = unimplemented!(); - let c: bool = unimplemented!(); - let d: bool = unimplemented!(); - let e: bool = unimplemented!(); - let _ = a && b || a; - let _ = !(a && b); - let _ = false && a; - // don't lint on cfgs - let _ = cfg!(you_shall_not_not_pass) && a; - let _ = a || !b || !c || !d || !e; - let _ = !(a && b || c); -} - -fn equality_stuff() { - let a: i32 = unimplemented!(); - let b: i32 = unimplemented!(); - let _ = a == b && a != b; - let _ = a < b && a >= b; - let _ = a > b && a <= b; - let _ = a > b && a == b; -} - -fn check_expect() { - let a: i32 = unimplemented!(); - let b: i32 = unimplemented!(); - #[expect(clippy::logic_bug)] - let _ = a < b && a >= b; -} |