Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

never_patterns: Parse match arms with no body #118527

Merged
merged 7 commits into from
Dec 8, 2023

Commits on Dec 2, 2023

  1. Add tests

    Nadrieril committed Dec 2, 2023
    Configuration menu
    Copy the full SHA
    caa488b View commit details
    Browse the repository at this point in the history

Commits on Dec 3, 2023

  1. Configuration menu
    Copy the full SHA
    80bdcbf View commit details
    Browse the repository at this point in the history
  2. Detect attempts to expand a macro to a match arm again

    Because a macro invocation can expand to a never pattern, we can't rule
    out a `arm!(),` arm at parse time. Instead we detect that case at
    expansion time, if the macro tries to output a pattern followed by `=>`.
    Nadrieril committed Dec 3, 2023
    Configuration menu
    Copy the full SHA
    0bfebc6 View commit details
    Browse the repository at this point in the history
  3. Disallow an arm without a body (except for never patterns)

    Parsing now accepts a match arm without a body, so we must make sure to
    only accept that if the pattern is a never pattern.
    Nadrieril committed Dec 3, 2023
    Configuration menu
    Copy the full SHA
    a2dcb3a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    06a8ed1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    70deb9a View commit details
    Browse the repository at this point in the history
  6. Satisfy tidy

    Nadrieril committed Dec 3, 2023
    Configuration menu
    Copy the full SHA
    431cc4a View commit details
    Browse the repository at this point in the history