]> git.lizzy.rs Git - rust.git/blob - tests/ui/deriving/deriving-via-extension-enum.rs
Rollup merge of #106618 - jmillikin:os-net-rustdoc-wasm32, r=JohnTitor
[rust.git] / tests / ui / deriving / deriving-via-extension-enum.rs
1 // run-pass
2 #![allow(dead_code)]
3 #[derive(PartialEq, Debug)]
4 enum Foo {
5     Bar(isize, isize),
6     Baz(f64, f64)
7 }
8
9 pub fn main() {
10     let a = Foo::Bar(1, 2);
11     let b = Foo::Bar(1, 2);
12     assert_eq!(a, b);
13     assert!(!(a != b));
14     assert!(a.eq(&b));
15     assert!(!a.ne(&b));
16 }