Description
There are a few checks that are currently only done at macro invocation time (or are not done at all) that really would make more sense to do a macro definition time.
This is a tracking issue to implement these checks.
-
Checking that the Kleene operator used in the body is the same as that in the matcher (Add meta-variable checks in macro definitions #62008)
-
Checking that all meta-variables used in the body are defined and in scope (Add meta-variable checks in macro definitions #62008)
-
Checking that all meta-variables used in the body are repeating at the right depth (Add meta-variable checks in macro definitions #62008)
-
Checking that the body of a macro is actually valid rust syntax (to the extent that we can, anyway)- https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=55fee22139ff7ef1f9470cd048e62885
- This might be impossible... leaving it off for now...
-
Maybe fix false positives/negatives
-
Possibly propose not using kleene op on RHS