Skip to content
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: Fix warning in components/layout_2020 #31708

Merged
merged 1 commit into from Mar 19, 2024

Conversation

Aaryakhandelwal
Copy link
Contributor

@Aaryakhandelwal Aaryakhandelwal commented Mar 16, 2024

Fixed the unresolved links present in components/layout_2020

  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes are part of Fix as many rustdoc errors as possible #31575 (GitHub issue number if applicable)
  • These changes do not require tests because they only change documentation and no functionality.

@Rhea-Eve
Copy link
Contributor

Sorry, I didn't see this before I added my own pr. I resolved some of the broken references differently. See #31712.

@@ -32,7 +32,7 @@ use crate::style_ext::PaddingBorderMargin;
use crate::ContainingBlock;

pub(super) struct LineMetrics {
/// The block offset of the line start in the containing [`InlineFormattingContext`].
/// The block offset of the line start in the containing Inline Formatting Context.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can just qualify the reference to InlineFormattingContext instead of removing the link.

@@ -59,7 +59,7 @@ pub(crate) enum NonReplacedFormattingContextContents {
// Other layout modes go here
}

/// The baselines of a layout or a [`BoxFragment`]. Some layout uses the first and some layout uses
/// The baselines of a layout or [`Fragment::Box`] Some layout uses the first and some layout uses
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, I think this just needs to be qualified. Fragment::Box is an enum variant, but this is actually referring to the struct stored inside the enum variant BoxFragment.

@Rhea-Eve
Copy link
Contributor

@mrobinson I think that third edit that @Aaryakhandelwal suggested seems to be accurate. She changed [Self::handle_cell] to [Self::add_cell]. After looking at it, this was my hunch too, but I wasn't entirely sure. Currently, there does not seem to be a function called handle_cell. And it seems that the comment was added at the same time as add_cell.

@Aaryakhandelwal
Copy link
Contributor Author

@mrobinson , Am I still supposed to make changes, as the next PR created by @Rhea-Eve already handles these both errors correctly.

@mrobinson
Copy link
Member

@mrobinson , Am I still supposed to make changes, as the next PR created by @Rhea-Eve already handles these both errors correctly.

Let's land both PRs. I suggest just updating this PR to remove the first two changes.

@mrobinson mrobinson changed the title Fix rust doc errors in components/layout_2020 rustdoc: Fix warning in components/layout_2020 Mar 18, 2024
@Aaryakhandelwal
Copy link
Contributor Author

@mrobinson , Am I still supposed to make changes, as the next PR created by @Rhea-Eve already handles these both errors correctly.

Let's land both PRs. I suggest just updating this PR to remove the first two changes.

Yes, I will do that

@mrobinson mrobinson added this pull request to the merge queue Mar 19, 2024
Merged via the queue into servo:main with commit 2a02f94 Mar 19, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants