-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Fix intra-doc handling of Self
in enum
#82563
Conversation
Some changes occurred in intra-doc-links. cc @jyn514 |
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jyn514 (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
This comment has been minimized.
This comment has been minimized.
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 looks great, thanks!
src/test/rustdoc/issue-82209.rs
Outdated
pub enum Foo { | ||
Bar { | ||
abc: i32, | ||
/// [Self::Bar::abc] |
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.
Can you also test that this generates the right link? There's instructions at https://rustc-dev-guide.rust-lang.org/rustdoc-internals.html#dotting-is-and-crossing-ts and examples in the other files in this directory.
Please also move this to rustdoc/intra-doc
, with the rest of the intra-doc link tests.
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.
I've added a test for the generation of the link. I used a #![crate_name = "foo"]
at the beginning since I couldn't get it to work with issue-82209
as the name of the file. Is the repetition of "foo" okay?
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.
Yes, that's fine. Fyi the way to do it with dashes is to change them to underscores in the filename, but this works too.
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.
Thanks for the explanation.
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
@bors r+ squash This is great, thanks! |
📌 Commit 5835f6d has been approved by |
…jyn514 Fix intra-doc handling of `Self` in enum Fixes rust-lang#82209
Rollup of 11 pull requests Successful merges: - rust-lang#81856 (Suggest character encoding is incorrect when encountering random null bytes) - rust-lang#82395 (Add missing "see its documentation for more" stdio) - rust-lang#82401 (Remove a redundant macro) - rust-lang#82498 (Use log level to control partitioning debug output) - rust-lang#82534 (Link crtbegin/crtend on musl to terminate .eh_frame) - rust-lang#82537 (Update measureme dependency to the latest version) - rust-lang#82561 (doc: cube root, not cubic root) - rust-lang#82563 (Fix intra-doc handling of `Self` in enum) - rust-lang#82584 (Add ARIA role to sidebar toggle in Rustdoc) - rust-lang#82596 (clarify RW lock's priority gotcha) - rust-lang#82607 (Add a getter for Frame.loc) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #82209