Closed ctron closed 2 years ago
The macro pre-dates const generics so I'm not surprised it has problems parsing them. I'm actually not sure if it handles generics at all.
My recommendation is to use the ServiceBuilder
API instead of the macro for anything at all complex. You can look at the ble_dis_bas_peripheral_builder.rs example or use rust-analyzer's expand macro function to get a starting point.
If you'd like to look at fixing the macro for these cases, PRs are welcome.
Having a GATT service like:
I would expect this to work. However I do get a weird compiler error:
I assume the code generation in the macro doesn't handle this properly.