summaryrefslogtreecommitdiffstats
path: root/tests/ui/binop/eq-arr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/binop/eq-arr.rs')
-rw-r--r--tests/ui/binop/eq-arr.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/binop/eq-arr.rs b/tests/ui/binop/eq-arr.rs
new file mode 100644
index 000000000..a77c4c5aa
--- /dev/null
+++ b/tests/ui/binop/eq-arr.rs
@@ -0,0 +1,7 @@
+fn main() {
+ struct X;
+ //~^ HELP consider annotating `X` with `#[derive(PartialEq)]`
+ let xs = [X, X, X];
+ let eq = xs == [X, X, X];
+ //~^ ERROR binary operation `==` cannot be applied to type `[X; 3]`
+}