In C its possible to write a macro that declares variables, as follows:
#define VARS(a, b, c) \ int a, b, c; Of course this isn't something you'd typically want to do.
In the actual example I'm looking to get working its not quite so simple.
#define VARS(data, stride, a, b, c) \ MyStruct *a = &data.array[0], \ MyStruct *b = &data.array[1 * (stride)], \ MyStruct *c = &data.array[2 * (stride)]; However the exact details of assignment shouldn't matter for the purpose of this question.
Is it possible to write a macro like this in Rust? If so how would this be written?