3 #[allow(clippy::identity_op, clippy::double_parens, clippy::many_single_char_names)]
4 #[allow(clippy::no_effect, unused_variables, clippy::unnecessary_operation, clippy::short_circuit_statement)]
5 #[allow(clippy::nonminimal_bool)]
8 // simple values and comparisons
11 // even though I agree that no means no ;-)
16 // casts, methods, parentheses
17 (1 as u64) & (1 as u64);
20 // unary and binary operators
22 ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
23 (1 * 2) + (3 * 4) == 1 * 2 + 3 * 4;
25 // various other things
28 vec![1, 2, 3] == vec![1, 2, 3]; //no error yet, as we don't match macros
51 2*a.len() == 2*a.len(); // ok, functions
52 a.pop() == a.pop(); // ok, functions
59 const C: u32 = A / B; // ok, different named constants
64 macro_rules! check_if_named_foo {
65 ($expression:expr) => (
66 if stringify!($expression) == "foo" {
74 fn check_ignore_macro() {
75 check_if_named_foo!(foo);