Open
Conversation
Collaborator
|
Some changes occurred in HTML/CSS/JS. |
This comment has been minimized.
This comment has been minimized.
20f13be to
4b35c49
Compare
This comment has been minimized.
This comment has been minimized.
4b35c49 to
4416897
Compare
Member
Author
|
Oh and also cc @lolbinarycat as you reviewed the original PR too. :) |
This comment has been minimized.
This comment has been minimized.
4416897 to
be7815f
Compare
This comment has been minimized.
This comment has been minimized.
be7815f to
3e05767
Compare
This comment has been minimized.
This comment has been minimized.
Member
Author
|
Fixed merge conflicts. |
This comment has been minimized.
This comment has been minimized.
Contributor
|
blocking this on #154902, since that relies on |
3e05767 to
ce98d4e
Compare
Collaborator
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
mejrs
reviewed
Apr 7, 2026
ce98d4e to
5ada01c
Compare
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.
Since it seems like I can't reopen #145458, opening this one. Although, it's the same PR minus the last new commit to handle a comment that was left unresolved in the original PR. All relevant details are still in the original PR though.
It's an alternative (and likely a take-over) of #148005 since lang-team rejected the idea to add documentation on macro branches, making the multiple files approach less suitable.
This implements #145153 in rustdoc. This PR voluntarily doesn't touch anything related to intra-doc links, I'll send a follow-up if needed.
So now about the implementation itself: this is a weird case where a macro can be different things at once but still only gets one file generated. I saw two ways to implement this:
ItemKind::Macrodifferently and iter through itsMacroKindsvalues.ItemKindenum, which means that when we encounter them in rendering, we need to ignore them. It also makes theItemKindenum bigger (and also needs more code to be handled). Another downside is that it needs to be handled in the JSON output.Now there was an interesting improvement that came with this PR in the
html::render::print_item::item_modulefunction: I simplified its implementation and split the different parts in aHashMapwhere the key is the item type. So then, we can just iterate through the keys and open/close the section at each iteration instead of keeping anOption<section>around.From RFCs:
macro_rules!) attribute macros (RFC 3697) #144579macro_rules!) derive macros (RFC 3698) #145208r? @notriddle