batch-impl 0.8.2

A proc-macro library for batch generating trait impls with a powerful DSL
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use batch_impl::batch_impl;

// A lifetime argument (`'_` of `Cow<'_, A>`) cannot bind a type argument
// (`u8` of the leaf): the parameter classes differ, the verbatim compare
// fails. `Cow<'_, A>` can only match a `Cow<'_, X>`-shaped leaf.
struct Pair2<A, B>(A, B);

#[batch_impl(Pair2<u8, u16> impl{Cow<'_, A>} { fn mk(x: u8) -> A { x } })]
trait BadLifetimeArg {
    fn mk(x: u8) -> u16;
}

fn main() {}