Fix commonmark Markdown warnings in docs, part 1

Fixes warnings from rust-lang/rust#44229 when `--enable-commonmark` is
passed to rustdoc.

This is mostly a global find-and-replace for bare URIs on lines by
themselves in doc comments.
This commit is contained in:
Matt Brubeck 2017-10-17 09:39:20 -07:00
parent aa3122e7d1
commit efc3683cc7
137 changed files with 572 additions and 565 deletions

View file

@ -16,7 +16,7 @@ use values::generics::rect::Rect;
/// A clipping shape, for `clip-path`.
pub type ClippingShape<BasicShape, Url> = ShapeSource<BasicShape, GeometryBox, Url>;
/// https://drafts.fxtf.org/css-masking-1/#typedef-geometry-box
/// <https://drafts.fxtf.org/css-masking-1/#typedef-geometry-box>
#[allow(missing_docs)]
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
@ -71,7 +71,7 @@ pub enum BasicShape<H, V, LengthOrPercentage> {
Polygon(Polygon<LengthOrPercentage>),
}
/// https://drafts.csswg.org/css-shapes/#funcdef-inset
/// <https://drafts.csswg.org/css-shapes/#funcdef-inset>
#[allow(missing_docs)]
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
@ -81,7 +81,7 @@ pub struct InsetRect<LengthOrPercentage> {
pub round: Option<BorderRadius<LengthOrPercentage>>,
}
/// https://drafts.csswg.org/css-shapes/#funcdef-circle
/// <https://drafts.csswg.org/css-shapes/#funcdef-circle>
#[allow(missing_docs)]
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
@ -91,7 +91,7 @@ pub struct Circle<H, V, LengthOrPercentage> {
pub radius: ShapeRadius<LengthOrPercentage>,
}
/// https://drafts.csswg.org/css-shapes/#funcdef-ellipse
/// <https://drafts.csswg.org/css-shapes/#funcdef-ellipse>
#[allow(missing_docs)]
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
@ -102,7 +102,7 @@ pub struct Ellipse<H, V, LengthOrPercentage> {
pub semiaxis_y: ShapeRadius<LengthOrPercentage>,
}
/// https://drafts.csswg.org/css-shapes/#typedef-shape-radius
/// <https://drafts.csswg.org/css-shapes/#typedef-shape-radius>
#[allow(missing_docs)]
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
@ -121,7 +121,7 @@ pub enum ShapeRadius<LengthOrPercentage> {
#[derive(Clone, Debug, PartialEq, ToComputedValue)]
/// A generic type for representing the `polygon()` function
///
/// https://drafts.csswg.org/css-shapes/#funcdef-polygon
/// <https://drafts.csswg.org/css-shapes/#funcdef-polygon>
pub struct Polygon<LengthOrPercentage> {
/// The filling rule for a polygon.
pub fill: FillRule,

View file

@ -63,7 +63,7 @@ impl<L> BorderSpacing<L> {
/// A generic value for `border-radius`, `outline-radius` and `inset()`.
///
/// https://drafts.csswg.org/css-backgrounds-3/#border-radius
/// <https://drafts.csswg.org/css-backgrounds-3/#border-radius>
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug)]

View file

@ -16,7 +16,7 @@ use values::specified::grid::parse_line_names;
/// A `<grid-line>` type.
///
/// https://drafts.csswg.org/css-grid/#typedef-grid-row-start-grid-line
/// <https://drafts.csswg.org/css-grid/#typedef-grid-row-start-grid-line>
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
#[derive(Clone, Debug, Default, PartialEq, ToComputedValue)]
@ -25,7 +25,7 @@ pub struct GridLine<Integer> {
pub is_span: bool,
/// A custom identifier for named lines.
///
/// https://drafts.csswg.org/css-grid/#grid-placement-slot
/// <https://drafts.csswg.org/css-grid/#grid-placement-slot>
pub ident: Option<CustomIdent>,
/// Denotes the nth grid line from grid item's placement.
pub line_num: Option<Integer>,
@ -144,7 +144,7 @@ add_impls_for_keyword_enum!(TrackKeyword);
/// A track breadth for explicit grid track sizing. It's generic solely to
/// avoid re-implementing it for the computed type.
///
/// https://drafts.csswg.org/css-grid/#typedef-track-breadth
/// <https://drafts.csswg.org/css-grid/#typedef-track-breadth>
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
#[derive(Clone, Debug, PartialEq, ToComputedValue)]
@ -160,7 +160,7 @@ pub enum TrackBreadth<L> {
impl<L> TrackBreadth<L> {
/// Check whether this is a `<fixed-breadth>` (i.e., it only has `<length-percentage>`)
///
/// https://drafts.csswg.org/css-grid/#typedef-fixed-breadth
/// <https://drafts.csswg.org/css-grid/#typedef-fixed-breadth>
#[inline]
pub fn is_fixed(&self) -> bool {
match *self {
@ -183,7 +183,7 @@ impl<L: ToCss> ToCss for TrackBreadth<L> {
/// A `<track-size>` type for explicit grid track sizing. Like `<track-breadth>`, this is
/// generic only to avoid code bloat. It only takes `<length-percentage>`
///
/// https://drafts.csswg.org/css-grid/#typedef-track-size
/// <https://drafts.csswg.org/css-grid/#typedef-track-size>
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
#[derive(Clone, Debug, PartialEq)]
@ -193,18 +193,18 @@ pub enum TrackSize<L> {
/// A `minmax` function for a range over an inflexible `<track-breadth>`
/// and a flexible `<track-breadth>`
///
/// https://drafts.csswg.org/css-grid/#valdef-grid-template-columns-minmax
/// <https://drafts.csswg.org/css-grid/#valdef-grid-template-columns-minmax>
Minmax(TrackBreadth<L>, TrackBreadth<L>),
/// A `fit-content` function.
///
/// https://drafts.csswg.org/css-grid/#valdef-grid-template-columns-fit-content
/// <https://drafts.csswg.org/css-grid/#valdef-grid-template-columns-fit-content>
FitContent(L),
}
impl<L> TrackSize<L> {
/// Check whether this is a `<fixed-size>`
///
/// https://drafts.csswg.org/css-grid/#typedef-fixed-size
/// <https://drafts.csswg.org/css-grid/#typedef-fixed-size>
pub fn is_fixed(&self) -> bool {
match *self {
TrackSize::Breadth(ref breadth) => breadth.is_fixed(),
@ -347,7 +347,7 @@ where
/// The initial argument of the `repeat` function.
///
/// https://drafts.csswg.org/css-grid/#typedef-track-repeat
/// <https://drafts.csswg.org/css-grid/#typedef-track-repeat>
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
#[derive(Clone, Copy, Debug, PartialEq, ToComputedValue, ToCss)]
@ -477,7 +477,7 @@ pub enum TrackListValue<LengthOrPercentage, Integer> {
/// The type of a `<track-list>` as determined during parsing.
///
/// https://drafts.csswg.org/css-grid/#typedef-track-list
/// <https://drafts.csswg.org/css-grid/#typedef-track-list>
#[derive(Clone, Copy, Debug, PartialEq, ToComputedValue)]
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
@ -501,7 +501,7 @@ pub enum TrackListType {
/// A grid `<track-list>` type.
///
/// https://drafts.csswg.org/css-grid/#typedef-track-list
/// <https://drafts.csswg.org/css-grid/#typedef-track-list>
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
#[derive(Clone, Debug, PartialEq)]

View file

@ -30,13 +30,13 @@ pub enum Image<Gradient, MozImageRect, ImageUrl> {
/// A `-moz-element(# <element-id>)`
Element(Atom),
/// A paint worklet image.
/// https://drafts.css-houdini.org/css-paint-api/
/// <https://drafts.css-houdini.org/css-paint-api/>
#[cfg(feature = "servo")]
PaintWorklet(PaintWorklet),
}
/// A CSS gradient.
/// https://drafts.csswg.org/css-images/#gradients
/// <https://drafts.csswg.org/css-images/#gradients>
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
#[derive(Clone, Debug, PartialEq, ToComputedValue)]
@ -110,7 +110,7 @@ pub enum Ellipse<LengthOrPercentage> {
Extent(ShapeExtent),
}
/// https://drafts.csswg.org/css-images/#typedef-extent-keyword
/// <https://drafts.csswg.org/css-images/#typedef-extent-keyword>
define_css_keyword_enum!(ShapeExtent:
"closest-side" => ClosestSide,
"farthest-side" => FarthestSide,
@ -122,7 +122,7 @@ define_css_keyword_enum!(ShapeExtent:
add_impls_for_keyword_enum!(ShapeExtent);
/// A gradient item.
/// https://drafts.csswg.org/css-images-4/#color-stop-syntax
/// <https://drafts.csswg.org/css-images-4/#color-stop-syntax>
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
#[derive(Clone, Copy, Debug, PartialEq, ToComputedValue, ToCss)]
@ -134,7 +134,7 @@ pub enum GradientItem<Color, LengthOrPercentage> {
}
/// A color stop.
/// https://drafts.csswg.org/css-images/#typedef-color-stop-list
/// <https://drafts.csswg.org/css-images/#typedef-color-stop-list>
#[derive(Clone, Copy, PartialEq, ToComputedValue, ToCss)]
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
@ -146,7 +146,7 @@ pub struct ColorStop<Color, LengthOrPercentage> {
}
/// Specified values for a paint worklet.
/// https://drafts.css-houdini.org/css-paint-api/
/// <https://drafts.css-houdini.org/css-paint-api/>
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
pub struct PaintWorklet {

View file

@ -68,7 +68,7 @@ impl SymbolsType {
}
}
/// https://drafts.csswg.org/css-counter-styles/#typedef-counter-style
/// <https://drafts.csswg.org/css-counter-styles/#typedef-counter-style>
///
/// Since wherever <counter-style> is used, 'none' is a valid value as
/// well, we combine them into one type to make code simpler.
@ -159,8 +159,8 @@ impl<T: ToCss> ToCss for FontSettingTag<T> {
}
impl<T: Parse> Parse for FontSettingTag<T> {
/// https://www.w3.org/TR/css-fonts-3/#propdef-font-feature-settings
/// https://drafts.csswg.org/css-fonts-4/#low-level-font-variation-
/// <https://www.w3.org/TR/css-fonts-3/#propdef-font-feature-settings>
/// <https://drafts.csswg.org/css-fonts-4/#low-level-font-variation->
/// settings-control-the-font-variation-settings-property
/// <string> [ on | off | <integer> ]
/// <string> <number>
@ -201,7 +201,7 @@ pub enum FontSettings<T> {
}
impl<T: Parse> Parse for FontSettings<T> {
/// https://www.w3.org/TR/css-fonts-3/#propdef-font-feature-settings
/// <https://www.w3.org/TR/css-fonts-3/#propdef-font-feature-settings>
fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
if input.try(|i| i.expect_ident_matching("normal")).is_ok() {
return Ok(FontSettings::Normal);

View file

@ -15,7 +15,7 @@ use values::distance::{ComputeSquaredDistance, SquaredDistance};
/// An SVG paint value
///
/// https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint
/// <https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint>
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
#[derive(Animate, Clone, ComputeSquaredDistance, Debug, PartialEq)]
@ -64,7 +64,7 @@ impl<ColorType, UrlPaintServer> SVGPaintKind<ColorType, UrlPaintServer> {
/// Parse SVGPaint's fallback.
/// fallback is keyword(none), Color or empty.
/// https://svgwg.org/svg2-draft/painting.html#SpecifyingPaint
/// <https://svgwg.org/svg2-draft/painting.html#SpecifyingPaint>
fn parse_fallback<'i, 't, ColorType: Parse>(context: &ParserContext,
input: &mut Parser<'i, 't>)
-> Option<Either<ColorType, None_>> {
@ -110,7 +110,7 @@ impl<ColorType: Parse, UrlPaintServer: Parse> Parse for SVGPaint<ColorType, UrlP
}
/// A value of <length> | <percentage> | <number> for svg which allow unitless length.
/// https://www.w3.org/TR/SVG11/painting.html#StrokeProperties
/// <https://www.w3.org/TR/SVG11/painting.html#StrokeProperties>
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
#[derive(Clone, Copy, Debug, PartialEq, ToAnimatedValue)]

View file

@ -39,7 +39,7 @@ pub struct TransformOrigin<H, V, Depth> {
/// A generic timing function.
///
/// https://drafts.csswg.org/css-timing-1/#single-timing-function-production
/// <https://drafts.csswg.org/css-timing-1/#single-timing-function-production>
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
#[derive(Clone, Copy, Debug, PartialEq)]