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

Opaque builtin derive macros #63462

Merged
merged 7 commits into from
Aug 17, 2019

Commits on Aug 17, 2019

  1. Stop emulating cross-crate hygiene with gensyms

    Most `Ident`s are serialized as `InternedString`s the exceptions are:
    
    * Reexports
    * Attributes
    * Idents in macro definitions
    
    Using gensyms helped reexports emulate hygiene. However, the actual item
    wouldn't have a gensymmed name so would be usable cross-crate. So
    removing this case until we have proper cross-crate hygiene seems
    sensible.
    
    Codegen attributes (`inline`, `export_name`) are resolved by their
    `Symbol`. This meant that opaque macro-expanded codegen attributes could
    cause linker errors. This prevented making built-in derives hygienic.
    matthewjasper committed Aug 17, 2019
    Configuration menu
    Copy the full SHA
    497b502 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6ee60af View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0280e8f View commit details
    Browse the repository at this point in the history
  4. Remove gensyms from built-in derives

    Also make them generally more hygienic with name resolution.
    matthewjasper committed Aug 17, 2019
    Configuration menu
    Copy the full SHA
    3296d0e View commit details
    Browse the repository at this point in the history
  5. Move type parameter shadowing errors to resolve

    For some reason type checking did this. Further it didn't consider
    hygiene.
    matthewjasper committed Aug 17, 2019
    Configuration menu
    Copy the full SHA
    f70c90c View commit details
    Browse the repository at this point in the history
  6. Remove SyntaxContext from {ast, hir}::{GlobalAsm, InlineAsm}

    We now store it in the `Span` of the expression or item.
    matthewjasper committed Aug 17, 2019
    Configuration menu
    Copy the full SHA
    d04af19 View commit details
    Browse the repository at this point in the history
  7. Remove unused SyntaxContext serialization impls

    The implementations were wrong and unused.
    matthewjasper committed Aug 17, 2019
    Configuration menu
    Copy the full SHA
    1c0a546 View commit details
    Browse the repository at this point in the history