rustdoc: Fix many rustdoc errors (#31147)

This fixes many rustdoc errors that occur due to raw URLs in rustdoc
comments as well as unescaped Rust code that should be in backticks.
This commit is contained in:
Martin Robinson 2024-01-22 14:13:48 +01:00 committed by GitHub
parent d7de206dbd
commit 5c1723c983
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
185 changed files with 939 additions and 942 deletions

View file

@ -38,7 +38,7 @@ impl FlexContainer {
}
}
/// https://drafts.csswg.org/css-flexbox/#flex-items
/// <https://drafts.csswg.org/css-flexbox/#flex-items>
struct FlexContainerBuilder<'a, 'dom, Node> {
context: &'a LayoutContext<'a>,
info: &'a NodeAndStyleInfo<Node>,
@ -98,7 +98,7 @@ where
}
}
/// https://drafts.csswg.org/css-text/#white-space
/// <https://drafts.csswg.org/css-text/#white-space>
fn is_only_document_white_space<Node>(run: &TextRun<'_, Node>) -> bool {
// FIXME: is this the right definition? See
// https://github.com/w3c/csswg-drafts/issues/5146

View file

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
//! https://drafts.csswg.org/css-flexbox/#box-model
//! <https://drafts.csswg.org/css-flexbox/#box-model>
use style::properties::longhands::flex_direction::computed_value::T as FlexDirection;
@ -87,7 +87,7 @@ pub(super) enum FlexAxis {
}
/// Which flow-relative sides map to the main-start and cross-start sides, respectively.
/// See https://drafts.csswg.org/css-flexbox/#box-model
/// See <https://drafts.csswg.org/css-flexbox/#box-model>
#[derive(Clone, Copy)]
pub(super) enum MainStartCrossStart {
InlineStartBlockStart,

View file

@ -69,10 +69,10 @@ struct FlexItem<'a> {
/// This is the difference between an outer and inner size.
pbm_auto_is_zero: FlexRelativeVec2<Length>,
/// https://drafts.csswg.org/css-flexbox/#algo-main-item
/// <https://drafts.csswg.org/css-flexbox/#algo-main-item>
flex_base_size: Length,
/// https://drafts.csswg.org/css-flexbox/#algo-main-item
/// <https://drafts.csswg.org/css-flexbox/#algo-main-item>
hypothetical_main_size: Length,
/// This is `align-self`, defaulting to `align-items` if `auto`
align_self: AlignItems,
@ -153,7 +153,7 @@ impl FlexContainer {
ContentSizes::zero() // Return an incorrect result rather than panic
}
/// https://drafts.csswg.org/css-flexbox/#layout-algorithm
/// <https://drafts.csswg.org/css-flexbox/#layout-algorithm>
pub(crate) fn layout(
&self,
layout_context: &LayoutContext,
@ -552,7 +552,7 @@ impl<'a> FlexItem<'a> {
}
}
/// https://drafts.csswg.org/css-flexbox/#algo-main-item
/// <https://drafts.csswg.org/css-flexbox/#algo-main-item>
fn flex_base_size(
flex_context: &FlexContext,
flex_item: &mut IndependentFormattingContext,
@ -872,7 +872,7 @@ impl FlexLine<'_> {
}
/// Return the *main size* of each item, and the lines remainaing free space
/// https://drafts.csswg.org/css-flexbox/#resolve-flexible-lengths
/// <https://drafts.csswg.org/css-flexbox/#resolve-flexible-lengths>
fn resolve_flexible_lengths(&self, container_main_size: Length) -> (Vec<Length>, Length) {
let mut frozen = vec![false; self.items.len()];
let mut target_main_sizes_vec = self
@ -1135,7 +1135,7 @@ impl<'a> FlexItem<'a> {
}
impl<'items> FlexLine<'items> {
/// https://drafts.csswg.org/css-flexbox/#algo-cross-line
/// <https://drafts.csswg.org/css-flexbox/#algo-cross-line>
fn cross_size(
&self,
item_layout_results: &[FlexItemLayoutResult],
@ -1238,7 +1238,7 @@ impl<'items> FlexLine<'items> {
impl FlexItem<'_> {
/// Return the cross-start and cross-end margin, with `auto` values resolved.
/// https://drafts.csswg.org/css-flexbox/#algo-cross-margins
/// <https://drafts.csswg.org/css-flexbox/#algo-cross-margins>
fn resolve_auto_cross_margins(
&self,
flex_context: &FlexContext,