]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/eq_op.rs
Auto merge of #8374 - Alexendoo:bless-revisions, r=camsteffen
[rust.git] / tests / ui / eq_op.rs
index 4e09d19ea214572f70adbeba6142268609c7a2f7..707b449f82e4f04ea4e85b4efeb76b17820aaa33 100644 (file)
@@ -2,7 +2,7 @@
 
 #[rustfmt::skip]
 #[warn(clippy::eq_op)]
-#[allow(clippy::identity_op, clippy::double_parens, clippy::many_single_char_names)]
+#[allow(clippy::identity_op, clippy::double_parens)]
 #[allow(clippy::no_effect, unused_variables, clippy::unnecessary_operation, clippy::short_circuit_statement)]
 #[allow(clippy::nonminimal_bool)]
 #[allow(unused)]
@@ -86,3 +86,12 @@ fn check_ignore_macro() {
     // checks if the lint ignores macros with `!` operator
     !bool_macro!(1) && !bool_macro!("");
 }
+
+struct Nested {
+    inner: ((i32,), (i32,), (i32,)),
+}
+
+fn check_nested(n1: &Nested, n2: &Nested) -> bool {
+    // `n2.inner.0.0` mistyped as `n1.inner.0.0`
+    (n1.inner.0).0 == (n1.inner.0).0 && (n1.inner.1).0 == (n2.inner.1).0 && (n1.inner.2).0 == (n2.inner.2).0
+}