summaryrefslogtreecommitdiffstats
path: root/tests/ui/binop/eq-vec.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/binop/eq-vec.rs')
-rw-r--r--tests/ui/binop/eq-vec.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/binop/eq-vec.rs b/tests/ui/binop/eq-vec.rs
new file mode 100644
index 000000000..17ce8df85
--- /dev/null
+++ b/tests/ui/binop/eq-vec.rs
@@ -0,0 +1,13 @@
+fn main() {
+ #[derive(Debug)]
+ enum Foo {
+ //~^ HELP consider annotating `Foo` with `#[derive(PartialEq)]`
+ Bar,
+ Qux,
+ }
+
+ let vec1 = vec![Foo::Bar, Foo::Qux];
+ let vec2 = vec![Foo::Bar, Foo::Qux];
+ assert_eq!(vec1, vec2);
+ //~^ ERROR binary operation `==` cannot be applied to type `Vec<Foo>`
+}