Conversation
adabb75 to
c964ce7
Compare
fc843e0 to
546e95a
Compare
546e95a to
bc41d52
Compare
joshlf
commented
Sep 26, 2024
2148b46 to
fa664c3
Compare
djkoloski
previously requested changes
Sep 26, 2024
d806d1a to
cc2acfe
Compare
Represent the result of parsing all `#[repr(...)]` attributes on a type as a high-level type which is only capable of representing valid combinations of `#[repr(...)]` attributes and processes them into a concise representation that's easier for high-level code to work with. This prepares us to more easily fix #1748. While we're here, we make a number of other improvements. 1) Errors are now converted to `TokenStream`s as late as possible rather than as early as possible, which was the previous behavior. This allows us to bail early when deriving an implied trait fails (e.g., deriving `TryFromBytes` when the user wrote `#[derive(FromZeros)]`). 2) Avoid re-computing some repr information in `TryFromBytes` enum support.
cc2acfe to
a5ebe1a
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1752 +/- ##
=======================================
Coverage 87.46% 87.46%
=======================================
Files 16 16
Lines 6021 6021
=======================================
Hits 5266 5266
Misses 755 755 ☔ View full report in Codecov by Sentry. |
joshlf
commented
Sep 28, 2024
This was referenced Sep 30, 2024
jswrenn
approved these changes
Sep 30, 2024
Collaborator
jswrenn
left a comment
There was a problem hiding this comment.
Reviewed over video call.
Addressed all feedback; re-reviewed by @jswrenn
This was referenced Oct 1, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Represent the result of parsing all
#[repr(...)]attributes on a type as a high-level type which is only capable of representing valid combinations of#[repr(...)]attributes and processes them into a concise representation that's easier for high-level code to work with.This prepares us to more easily fix #1748.
While we're here, we make a number of other improvements.
TokenStreams as late as possible rather than as early as possible, which was the previous behavior. This allows us to bail early when deriving an implied trait fails (e.g., derivingTryFromByteswhen the user wrote#[derive(FromZeros)]).TryFromBytesenum support.