]> git.lizzy.rs Git - rust.git/blob - tests/ui/deriving/deriving-via-extension-struct-tuple.rs
Rollup merge of #107022 - scottmcm:ordering-option-eq, r=m-ou-se
[rust.git] / tests / ui / deriving / deriving-via-extension-struct-tuple.rs
1 // run-pass
2 #[derive(PartialEq, Debug)]
3 struct Foo(isize, isize, String);
4
5 pub fn main() {
6   let a1 = Foo(5, 6, "abc".to_string());
7   let a2 = Foo(5, 6, "abc".to_string());
8   let b = Foo(5, 7, "def".to_string());
9
10   assert_eq!(a1, a1);
11   assert_eq!(a2, a1);
12   assert!(!(a1 == b));
13
14   assert!(a1 != b);
15   assert!(!(a1 != a1));
16   assert!(!(a2 != a1));
17 }