The change that made your code not compile is [5.9][Macros] Add missing macro validation. by hborla · Pull Request #67387 · apple/swift · GitHub (specifically the second commit: Diagnose macros attached to declarations they cannot apply to), following Jordan's reasoning:
There is no existing macro role that makes sense to apply to function parameters. I think we should have such a macro, but it should be a new kind of macro role -- either one that explicitly does nothing like Jordan suggests, or some other kind of macro role that's conceptually similar to a peer macro but generates peers inside the function body (which would also allow mimicking property wrappers attached to function arguments). Perhaps this should be explored in the pitch discussion for function body macros.