generate_same_lifetime!() { /* proc-macro */ }
Expand description

Creates a struct with many fields, each having the type &'a <type>, creating many places with one lifetime. For example:

use bench_utils::generate_same_lifetime;
generate_same_lifetime!(foo: LifetimesStruct<[i32; 3]> = 1);

generates a LifetimesStruct<'a> struct with 3 &'a i32 fields and assigns foo to an instantiation of the struct, with each field having the value &1.