Expand description

This library provides the StrippedPartialEq derive macro used to automatically implement the StrippedPartialEq comparison trait defined in the locspan library.

Usage

use locspan::Loc;
use locspan_derive::StrippedPartialEq;

// Implement `StrippedPartialEq` for the `Foo` type.
// Type parameters will be required to implement
// `StrippedPartialEq` themselves unless they are marked
// with `#[stripped_ignore]`.
#[derive(StrippedPartialEq)]
#[stripped_ignore(S, P)]
struct Foo<T, S, P> {
  a: Loc<T, S, P>,

  // Files are compared using `StrippedPartialEq`
  // unless they are marked with `#[stripped]`, in
  // which case `PartialEq` is used.
  #[stripped]
  b: std::path::PathBuf
}

Derive Macros