locspan-derive

Crates.iolocspan-derive
lib.rslocspan-derive
version0.6.0
sourcesrc
created_at2022-06-28 11:05:03.566106
updated_at2022-11-03 13:47:06.720318
descriptionDerive macros for the `locspan` code mapping library
homepage
repositoryhttps://github.com/timothee-haudebourg/locspan-derive
max_upload_size
id614770
size59,358
Timothée Haudebourg (timothee-haudebourg)

documentation

https://docs.rs/locspan-derive

README

Derive macros for the locspan code mapping library.

CI Crate informations License Documentation

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]`.
#[derive(StrippedPartialEq)]
struct Foo<T, #[stripped] S, #[stripped] 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
}

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 16

cargo fmt