generate_unique_lifetimes!() { /* proc-macro */ }
Expand description
Repeatedly borrows the same variable to create many places, locations, and lifetimes. For example:
use bench_utils::generate_unique_lifetimes;
generate_unique_lifetimes!(foo: [i32; 10] = 1);
generates a program which creates 10 “borrow” variables, each assigned to &foo
:
let foo = 1;
let borrow_1 = &foo;
let borrow_2 = &foo;
// ...