Debian Codegraph @

third_party/rust/derive_more/tests/not.rs

raw
1 #![cfg_attr(not(feature = "std"), no_std)]
2 #![allow(dead_code)]
3
4 use derive_more::Not;
5
6 #[derive(Not)]
7 struct MyInts(i32, i32);
8
9 #[derive(Not)]
10 struct Point2D {
11 x: i32,
12 y: i32,
13 }
14
15 #[derive(Not)]
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 }
24
25 #[derive(Not)]
26 enum EnumWithUnit {
27 SmallInt(i32),
28 Unit,
29 }