error-tree 0.6.0

This crate let's us use the `error_tree!` proc macro for ergonomic error hierarchy definition
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
crate::ix!();

pub fn ty_implements_partial_eq(_ty: &Type) -> bool {
    // Here, we can attempt to check if `ty` implements `PartialEq`
    // However, in a procedural macro, we cannot perform this check at compile time
    // So we'll need to assume that the user provides this information
    // We can introduce an attribute, e.g., `#[cmp_neq]`, as done earlier
    // For simplicity, we'll assume `PartialEq` is implemented
    // Alternatively, we could generate code that tries to compare and let the compiler raise an error if it doesn't implement `PartialEq`
    true
}

pub fn fields_implement_partial_eq(_fields: &[ErrorField]) -> bool {
    // Similar to the above, we cannot check at compile time in a macro
    // We'll assume all fields implement `PartialEq`
    true
}