Debian Codegraph @

third_party/rust/derive_more/tests/add.rs

raw
1 #![cfg_attr(not(feature = "std"), no_std)]
2 #![allow(dead_code)]
3
4 use derive_more::Add;
5
6 #[derive(Add)]
7 struct MyInts(i32, i32);
8
9 #[derive(Add)]
10 struct Point2D {
11 x: i32,
12 y: i32,
13 }
14
15 #[derive(Add)]
16 enum MixedInts {
17 SmallInt(i32),
18 BigInt(i64),
19 TwoSmallInts(i32, i32),
20 NamedSmallInts { x: i32, y: i32 },
21 UnsignedOne(u32),
22 UnsignedTwo(u32),
23 Unit,
24 }