-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rustc_expand
cleanups
#124607
Merged
Merged
rustc_expand
cleanups
#124607
Commits on May 2, 2024
-
rustc_expand: clean up attributes.
Sort them, and remove the unused ones (`lint_reasons` and `proc_macro_span`).
Configuration menu - View commit details
-
Copy full SHA for aabb90d - Browse repository at this point
Copy the full SHA aabb90dView commit details -
Configuration menu - View commit details
-
Copy full SHA for d817856 - Browse repository at this point
Copy the full SHA d817856View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7c6d363 - Browse repository at this point
Copy the full SHA 7c6d363View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3f05589 - Browse repository at this point
Copy the full SHA 3f05589View commit details -
Configuration menu - View commit details
-
Copy full SHA for 189a8a6 - Browse repository at this point
Copy the full SHA 189a8a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for e809df6 - Browse repository at this point
Copy the full SHA e809df6View commit details -
Inline and remove three
DummyResult
methods.They each have a single call site.
Configuration menu - View commit details
-
Copy full SHA for d7f5319 - Browse repository at this point
Copy the full SHA d7f5319View commit details -
Configuration menu - View commit details
-
Copy full SHA for c9c964f - Browse repository at this point
Copy the full SHA c9c964fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 79c4d02 - Browse repository at this point
Copy the full SHA 79c4d02View commit details -
Tweak
fully_expand_fragment
loop.Control flow never gets past the end of the `ExpandResult::Retry` match arm, due to the `span_bug` and the `continue`. Therefore, the code after the match can only be reached from the `ExpandResult::Ready` arm. This commit moves that code after the match into the `ExpandResult::Ready` arm, avoiding the need for the `continue` in the `ExpandResult::Retry` arm.
Configuration menu - View commit details
-
Copy full SHA for 3b69781 - Browse repository at this point
Copy the full SHA 3b69781View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1c15b6a - Browse repository at this point
Copy the full SHA 1c15b6aView commit details -
Introduce
Invocation::span_mut
.Alongside the existing `Invocation::span`.
Configuration menu - View commit details
-
Copy full SHA for ae7e328 - Browse repository at this point
Copy the full SHA ae7e328View commit details -
Because the type is not obvious, and this clarifies things.
Configuration menu - View commit details
-
Copy full SHA for 5ac017e - Browse repository at this point
Copy the full SHA 5ac017eView commit details -
It is currently an enum and the `tts` and `idx` fields are repeated across the two variants. This commit splits it into a struct `Frame` and an enum `FrameKind`, to factor out the duplication. The commit also renames `Frame::new` as `Frame::new_delimited` and adds `Frame::new_sequence`. I.e. both variants now have a constructor.
Configuration menu - View commit details
-
Copy full SHA for 3a3a15d - Browse repository at this point
Copy the full SHA 3a3a15dView commit details
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.