rustdoc: be more strict about "Methods from Deref"#138574
Merged
bors merged 1 commit intorust-lang:masterfrom Mar 24, 2025
Merged
rustdoc: be more strict about "Methods from Deref"#138574bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Collaborator
|
r? @notriddle rustbot has assigned @notriddle. Use |
This comment has been minimized.
This comment has been minimized.
3eb0da2 to
704ddc4
Compare
This comment has been minimized.
This comment has been minimized.
| pub fn get_u32(&self) -> u32 { self.0 } | ||
| } | ||
|
|
||
| // Note that the same href is used both on the method itself, |
Contributor
Author
There was a problem hiding this comment.
no, since we're testing that it appears twice, and in any case, we care about the negative case much more, which will trigger if the bad method shows up in the sidebar or on the main page.
This comment has been minimized.
This comment has been minimized.
fd11eee to
60156ca
Compare
GuillaumeGomez
approved these changes
Mar 22, 2025
Member
|
Thanks for the fix! Squash your commits then r=me. |
hack: is_doc_subtype_of always returns true for TyAlias it's worth noting that this function is only used in the handling of "Methods from Deref", and we were previously assuming all generic parameters were meaningless, so this is still an improvment from the status quo. this change means that we will have strictly less false positives without adding any new false negitives. Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
60156ca to
b46412f
Compare
Contributor
Author
|
(still don't have bors perms so I doubt the r= is going to do anything) |
Contributor
|
@bors r=GuillaumeGomez |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 24, 2025
Rollup of 10 pull requests Successful merges: - rust-lang#137593 (fix download-llvm logic for subtree sync branches) - rust-lang#137736 (Don't attempt to export compiler-builtins symbols from rust dylibs) - rust-lang#138135 (Simplify `PartialOrd` on tuples containing primitives) - rust-lang#138321 ([bootstrap] Distribute split debuginfo if present) - rust-lang#138574 (rustdoc: be more strict about "Methods from Deref") - rust-lang#138606 (Fix missing rustfmt in msi installer - cont) - rust-lang#138671 (Fix `FileType` `PartialEq` implementation on Windows) - rust-lang#138728 (Update `compiler-builtins` to 0.1.152) - rust-lang#138783 (Cache current_dll_path output) - rust-lang#138846 (Tweaks to writeback and `Obligation -> Goal` conversion) Failed merges: - rust-lang#138755 ([rustdoc] Remove duplicated loop when computing doc cfgs) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 24, 2025
Rollup merge of rust-lang#138574 - lolbinarycat:rustdoc-deref-24686-v2, r=GuillaumeGomez rustdoc: be more strict about "Methods from Deref" fixes rust-lang#137083 fixes rust-lang#24686 Currently done: * [x] fix `render_assoc_items_inner * [x] fix sidebar logic * [x] port test from rust-lang#137564 * [x] add test for sidebar items Note that this does not yet fix the sidebar logic.
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.
fixes #137083
fixes #24686
Currently done:
Note that this does not yet fix the sidebar logic.