Add map! and set! macros to std part II

There's no reason the macro couldn't just accept any of those syntax options.

error: `$key:expr` is followed by `:`, which is not allowed for `expr` fragments
 --> src/main.rs:6:15
  |
6 |     ($key:expr: $value:expr) => {}
  |               ^ not allowed after `expr` fragments
  |
  = note: allowed there are: `=>`, `,` or `;`
1 Like

That can be worked around with a more complex macro_rules! or with a proc macro.

1 Like