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