]> git.lizzy.rs Git - rust.git/blob - tests/ui/deriving/deriving-via-extension-struct.rs
Rollup merge of #107551 - fee1-dead-contrib:rm_const_fnmut_helper, r=oli-obk
[rust.git] / tests / ui / deriving / deriving-via-extension-struct.rs
1 // run-pass
2 #[derive(PartialEq, Debug)]
3 struct Foo {
4     x: isize,
5     y: isize,
6     z: isize,
7 }
8
9 pub fn main() {
10     let a = Foo { x: 1, y: 2, z: 3 };
11     let b = Foo { x: 1, y: 2, z: 3 };
12     assert_eq!(a, b);
13     assert!(!(a != b));
14     assert!(a.eq(&b));
15     assert!(!a.ne(&b));
16 }