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

Automatically implement AsRepr and allow deriving FromRepr for fieldless enums #81642

Closed

Commits on Jan 23, 2022

  1. Configuration menu
    Copy the full SHA
    3ce2e3a View commit details
    Browse the repository at this point in the history
  2. Add AsRepr trait for converting enums to reprs.

    This is automatically implemented for all data-free enums with explicit
    numeric reprs.
    
    This trait cannot be manually implemented by any types.
    illicitonion committed Jan 23, 2022
    Configuration menu
    Copy the full SHA
    5a5b0fb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5d574f3 View commit details
    Browse the repository at this point in the history
  4. Don't underflow when manipulating dummy spans

    Synthetically generated match statements with no real span were causing
    an underflow here. There's no point trying to manipulate dummy spans.
    illicitonion committed Jan 23, 2022
    Configuration menu
    Copy the full SHA
    3cf63f2 View commit details
    Browse the repository at this point in the history