Debian Codegraph @

tests/fixtures/valid/output/non-exhaustive.output.rs

raw symbols SCIP
1 #[non_exhaustive]
2 struct NonExhaustiveDiff<'__daft> {
3 pub a: <i32 as ::daft::Diffable>::Diff<'__daft>,
4 pub b: <i32 as ::daft::Diffable>::Diff<'__daft>,
5 }
6 impl<'__daft> ::core::fmt::Debug for NonExhaustiveDiff<'__daft>
7 where
8 <i32 as ::daft::Diffable>::Diff<'__daft>: ::core::fmt::Debug,
9 <i32 as ::daft::Diffable>::Diff<'__daft>: ::core::fmt::Debug,
10 {
11 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
12 f.debug_struct(stringify!(NonExhaustiveDiff))
13 .field(stringify!(a), &self.a)
14 .field(stringify!(b), &self.b)
15 .finish_non_exhaustive()
16 }
17 }
18 impl<'__daft> ::core::cmp::PartialEq for NonExhaustiveDiff<'__daft>
19 where
20 <i32 as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::PartialEq,
21 <i32 as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::PartialEq,
22 {
23 fn eq(&self, other: &Self) -> bool {
24 self.a == other.a && self.b == other.b
25 }
26 }
27 impl<'__daft> ::core::cmp::Eq for NonExhaustiveDiff<'__daft>
28 where
29 <i32 as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::Eq,
30 <i32 as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::Eq,
31 {}
32 impl ::daft::Diffable for NonExhaustive {
33 type Diff<'__daft> = NonExhaustiveDiff<'__daft> where Self: '__daft;
34 fn diff<'__daft>(&'__daft self, other: &'__daft Self) -> NonExhaustiveDiff<'__daft> {
35 Self::Diff {
36 a: ::daft::Diffable::diff(&self.a, &other.a),
37 b: ::daft::Diffable::diff(&self.b, &other.b),
38 }
39 }
40 }
41 impl ::daft::Diffable for NonExhaustiveEnum {
42 type Diff<'__daft> = ::daft::Leaf<&'__daft Self> where Self: '__daft;
43 fn diff<'__daft>(&'__daft self, other: &'__daft Self) -> Self::Diff<'__daft> {
44 ::daft::Leaf {
45 before: self,
46 after: other,
47 }
48 }
49 }