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

Move automatic generation of Unpin implementation to proc-macro-derive #77

Merged
merged 6 commits into from
Sep 7, 2019

Commits on Sep 7, 2019

  1. Move automatic generation of Unpin implementation to proc-macro-derive

    To generate the correct `Unpin` implementation, we need to collect the
    types of the pinned fields. However, since proc-macro-attribute is
    applied before cfg, we cannot be collecting field types at this timing.
    So instead of generating the `Unpin` implementation here, we need to
    delegate automatic generation of the `Unpin` implementation to
    proc-macro-derive.
    taiki-e committed Sep 7, 2019
    Configuration menu
    Copy the full SHA
    cf5b0cb View commit details
    Browse the repository at this point in the history
  2. Add validation to proc-macro-derive

    We need to check this on proc-macro-derive because cfg may reduce the
    fields. On the other hand, if we check this only on proc-macro-derive,
    it may generate unhelpful error messages. So, we need to check this on
    both proc-macro-attribute and proc-macro-derive.
    taiki-e committed Sep 7, 2019
    Configuration menu
    Copy the full SHA
    fe55c43 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5b09db5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9e04e2a View commit details
    Browse the repository at this point in the history
  5. Add tests

    taiki-e committed Sep 7, 2019
    Configuration menu
    Copy the full SHA
    fb8ebf4 View commit details
    Browse the repository at this point in the history
  6. Update examples

    taiki-e committed Sep 7, 2019
    Configuration menu
    Copy the full SHA
    6a0d419 View commit details
    Browse the repository at this point in the history