Closed crlf0710 closed 4 years ago
This would be on the language to permit static _
as valid syntax; it was decided against in https://github.com/rust-lang/rust/issues/54912.
To avoid naming elements from the macro you can make your macro expand to:
const _: () = {
#[distributed_slice(...)]
static __: Type = value;
};
OK, great to know, thanks!
I'm trying to write a macro that put elements into a distribute_slice. One hard thing is that i have to name the individual items...
I feel it would be more convenient if using _ as the name of anonymous slice element is supported (distribute_slice(XYZ) can replace it with whatever name it feels best i think).