]> git.lizzy.rs Git - rust.git/blob - src/test/ui/deriving/deriving-via-extension-type-params.rs
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[rust.git] / src / test / ui / deriving / deriving-via-extension-type-params.rs
1 // run-pass
2 #[derive(PartialEq, Hash, Debug)]
3 struct Foo<T> {
4     x: isize,
5     y: T,
6     z: isize
7 }
8
9 pub fn main() {
10     let a = Foo { x: 1, y: 2.0f64, z: 3 };
11     let b = Foo { x: 1, y: 2.0f64, z: 3 };
12     assert_eq!(a, b);
13     assert!(!(a != b));
14     assert!(a.eq(&b));
15     assert!(!a.ne(&b));
16 }