-
Notifications
You must be signed in to change notification settings - Fork 13.5k
rustdoc: Remove distinction between "regular" and "collapsed" docs #91072
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7be69ba
rustdoc: Make `doc_value()` dispatch to `collapsed_doc_value()`
camelid da26b51
Remove `doc_value()` and strip `collapsed_` prefix
camelid 22dc5c4
rustdoc: Remove `{Crate,SharedContext}.collapsed`
camelid 8be135b
Write code directly instead of using FromIterator
camelid 1891548
Remove outdated comment
camelid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the same behavior. The
FromIterator
impl below is missing thenew_frag.kind != ori.kind || new_frag.parent_module != ori.parent_module
check.I'm not sure if it matters in practice, but it seems like something we should have tests for ... could you try and find one or two, or add a new one if not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before merging collapsed and un-collapsed, I tried removing one part of this conditional and all the tests passed. I'll try removing the whole conditional too (with no other changes) to see what happens.
I agree it'd be good to have more test coverage. I'll see if I can come up with some test cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All tests pass with master + this diff:
So either that conditional is useless or we don't have any test coverage for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding enough test coverage around this code to know for sure that nothing is changing will take a long time. What about if I open a PR to remove this conditional, we land it, and wait to see if any regressions pop up? If there are any regressions, then we can do a quick revert since it's just a few lines. If we don't find any regressions, then we can move forward with a bigger change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I'm ok with that, but let's wait until after the beta branch on friday.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened #91305.