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

[derive] Simplify code, remove obsolete features #373

Conversation

joshlf
Copy link
Member

@joshlf joshlf commented Sep 12, 2023

I got too fancy with my GitHub-as-Gerrit foo and GitHub closed the old PR, so I'm reopening it here.

Clean up the implementation, especially in fn impl_block. Make the following notable changes:

  • Previously, syn didn't support parsing macro invocations in const generics without the full feature enabled. To avoid the compile-time overhead of that feature, we worked around it by constructing AST nodes manually. syn has since added support for this without requiring the full feature, so we make use of it.
  • We used to need to split types into those that transatively depended upon type generics (like [T; 2]) and those that didn't (like [u8; 2]). We made a change in Move field type bounds into where clauses #119 that made this distinction irrelevant, but we never removed the code to perform the split. In this commit, we remove that code. That code was the only reason we needed to enable syn's visit feature, so we are also able to remove that feature dependency.

@joshlf joshlf requested a review from djkoloski September 12, 2023 00:38
@joshlf joshlf force-pushed the try-from-bytes-raw-argument-to-is-bit-valid--derive-cleanup branch from 05e5775 to 77ad3c3 Compare September 12, 2023 01:19
@joshlf joshlf force-pushed the try-from-bytes-raw-argument-to-is-bit-valid-3-try-from-bytes branch from 68ab76d to a3235fc Compare September 12, 2023 01:19
@joshlf joshlf force-pushed the try-from-bytes-raw-argument-to-is-bit-valid--derive-cleanup branch from 77ad3c3 to 0b55a6d Compare September 12, 2023 01:40
@joshlf joshlf force-pushed the try-from-bytes-raw-argument-to-is-bit-valid-3-try-from-bytes branch from a3235fc to 2d0bef3 Compare September 12, 2023 01:40
@joshlf joshlf force-pushed the try-from-bytes-raw-argument-to-is-bit-valid--derive-cleanup branch from 0b55a6d to 1eff6f2 Compare September 12, 2023 02:22
@joshlf joshlf force-pushed the try-from-bytes-raw-argument-to-is-bit-valid-3-try-from-bytes branch from 2d0bef3 to dd8935d Compare September 12, 2023 02:22
@joshlf joshlf force-pushed the try-from-bytes-raw-argument-to-is-bit-valid--derive-cleanup branch from 1eff6f2 to fd32099 Compare September 12, 2023 02:48
@joshlf joshlf force-pushed the try-from-bytes-raw-argument-to-is-bit-valid-3-try-from-bytes branch from dd8935d to 9c77d7e Compare September 12, 2023 02:49
@joshlf joshlf force-pushed the try-from-bytes-raw-argument-to-is-bit-valid--derive-cleanup branch from fd32099 to a246d4e Compare September 12, 2023 03:43
@joshlf joshlf force-pushed the try-from-bytes-raw-argument-to-is-bit-valid-3-try-from-bytes branch from 9c77d7e to f2e9656 Compare September 12, 2023 03:44
@joshlf joshlf force-pushed the try-from-bytes-raw-argument-to-is-bit-valid--derive-cleanup branch from a246d4e to b56cb6b Compare September 12, 2023 06:16
@joshlf joshlf force-pushed the try-from-bytes-raw-argument-to-is-bit-valid-3-try-from-bytes branch from f2e9656 to 1244aba Compare September 12, 2023 06:16
@joshlf joshlf force-pushed the try-from-bytes-raw-argument-to-is-bit-valid--derive-cleanup branch from b56cb6b to 87c8329 Compare September 12, 2023 15:41
@joshlf joshlf merged commit 87c8329 into try-from-bytes-raw-argument-to-is-bit-valid-3-try-from-bytes Sep 12, 2023
@joshlf joshlf force-pushed the try-from-bytes-raw-argument-to-is-bit-valid-3-try-from-bytes branch from 1244aba to 43b24a2 Compare September 12, 2023 15:41
@joshlf joshlf deleted the try-from-bytes-raw-argument-to-is-bit-valid--derive-cleanup branch September 12, 2023 15:41
@joshlf joshlf restored the try-from-bytes-raw-argument-to-is-bit-valid--derive-cleanup branch September 12, 2023 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants