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

Assigns to a “main” variable and repeatedly creates temporary variables which use the “main” variable as an input. Each temporary uses its value to assign back to the “main” variable, generating infoflow between each temporary. For example:

use bench_utils::generate_flow;
generate_flow!(foo: [i32; 10] = 1);

generates

let mut foo = 1;
let temp_1 = foo;
foo = temp_1;
let temp_2 = foo;
foo = temp_2;
// ...