Skip to content

Add meta-variable checks in macro definitions#62008

Merged
bors merged 2 commits intorust-lang:masterfrom
ia0:issues_61053
Jul 20, 2019
Merged

Add meta-variable checks in macro definitions#62008
bors merged 2 commits intorust-lang:masterfrom
ia0:issues_61053

Conversation

@ia0
Copy link
Copy Markdown
Contributor

@ia0 ia0 commented Jun 20, 2019

This is an implementation of #61053. It is not sound (some errors are not reported) and not complete (reports may not be actual errors). This is due to the possibility to define macros in macros in indirect ways. See module documentation of macro_check for more details.

What remains to be done:

  • Migrate from an error to an allow-by-default lint.
  • Add more comments in particular for the handling of nested macros.
  • Add more tests if needed.
  • Try to avoid cloning too much (one idea is to use lists on the stack).
  • Run crater with deny-by-default lint (measure rate of false positives).
    • Remove extra commit for deny-by-default lint
  • Create a PR to remove the old question_mark_macro_sep lint Remove outdated question_mark_macro_sep lint #62160

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants