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

[Syntax] Implement auto trait syntax #45247

Merged
merged 15 commits into from
Nov 4, 2017

Commits on Nov 3, 2017

  1. [Syntax Breaking] Rename DefaultImpl to AutoImpl

    DefaultImpl is a highly confusing name for what we now call auto impls,
    as in `impl Send for ..`. The name auto impl is not formally decided
    but for sanity anything is better than `DefaultImpl` which refers
    neither to `default impl` nor to `impl Default`.
    leoyvens committed Nov 3, 2017
    Configuration menu
    Copy the full SHA
    06506bb View commit details
    Browse the repository at this point in the history
  2. add auto keyword, parse auto trait, lower to HIR

    Adds an `IsAuto` field to `ItemTrait` which flags if the trait was
    declared as an `auto trait`.
    
    Auto traits cannot have generics nor super traits.
    leoyvens committed Nov 3, 2017
    Configuration menu
    Copy the full SHA
    1f4b630 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    00be060 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    37dfc0c View commit details
    Browse the repository at this point in the history
  5. Add tests for auto trait, fix parsing bug

    Now we can do the well formedness checks in the parser, yay!
    leoyvens committed Nov 3, 2017
    Configuration menu
    Copy the full SHA
    acf50ee View commit details
    Browse the repository at this point in the history
  6. Finish DefaultImpl -> AutoImpl rename.

    Forgot this ones.
    leoyvens committed Nov 3, 2017
    Configuration menu
    Copy the full SHA
    0d1b79a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    8b586e6 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    9d181ac View commit details
    Browse the repository at this point in the history
  9. Parse auto traits the same as traits.

    This moves the well formedness checks to the AST validation pass. Tests
    were adjusted.
    
    The auto keyword should be back-compat now.
    leoyvens committed Nov 3, 2017
    Configuration menu
    Copy the full SHA
    97de8ca View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    94b07a9 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    27efe12 View commit details
    Browse the repository at this point in the history
  12. fix rebase conflict

    leoyvens committed Nov 3, 2017
    Configuration menu
    Copy the full SHA
    5e74353 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    3241f45 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    ca26f01 View commit details
    Browse the repository at this point in the history
  15. Fix unsafe auto trait pretty print.

    It was being printed wrong as auto unsafe trait
    leoyvens committed Nov 3, 2017
    Configuration menu
    Copy the full SHA
    5190abb View commit details
    Browse the repository at this point in the history