-
Notifications
You must be signed in to change notification settings - Fork 13k
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
[Rustdoc] Render tuple fields in structs correctly #80320
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,11 @@ | ||||||||
// @has tuple_struct_fields/struct.Tooople.html | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you also add a check like:
Suggested change
to make sure the heading is correct? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think i added that at one point then removed it because it wasn't working (and the errors are less helpful than staring at a wall), but ill try again tomorrow 👍 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yeah, htmldocck errors could use some work. |
||||||||
// @has - //span '0: usize' | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you write more complete paths please? It's much easier when an unwanted change occur to find out where it's from in such cases. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As i stated in an earlier comment, i tried that, but the test harness kept erroring and i could not figure out why, which is why i removed it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can help with that! :) If it's the same as a normal field, the path should look like this:
Also, please add tests to ensure that "Tuple fields" header is there and that the fields are in the sidebar too. |
||||||||
// @has - 'Wow! i love tuple fields!' | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same. |
||||||||
// @!has - 'I should be invisible' | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||||||||
|
||||||||
pub struct Tooople( | ||||||||
/// Wow! i love tuple fields! | ||||||||
pub usize, | ||||||||
/// I should be invisible | ||||||||
u8, | ||||||||
); |
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 didn't even know we could do that in rust! 😮