1use core::{fmt, marker::PhantomData};
2
3#[derive(Copy, Clone, Default, Ord, PartialOrd, Eq, PartialEq, Hash)]
8pub(crate) struct Id<'id> {
9 id: PhantomData<&'id mut &'id ()>,
10}
11
12unsafe impl<'id> Sync for Id<'id> {}
13unsafe impl<'id> Send for Id<'id> {}
14
15impl<'id> fmt::Debug for Id<'id> {
16 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
17 f.debug_struct("Id<'id>").finish()
18 }
19}
20
21#[derive(Copy, Clone, Debug, Ord, PartialOrd, Eq, PartialEq, Hash)]
23pub enum NonEmpty {}
24
25#[derive(Copy, Clone, Debug, Ord, PartialOrd, Eq, PartialEq, Hash)]
27pub enum Unknown {}
28
29pub trait ProofAdd {
31 type Sum;
32}
33
34impl<Q> ProofAdd for (NonEmpty, Q) {
35 type Sum = NonEmpty;
36}
37impl<Q> ProofAdd for (Unknown, Q) {
38 type Sum = Q;
39}