rustdoc: Fix some more broken links
This commit is contained in:
parent
c605c2b57b
commit
0dbfa5f611
3 changed files with 31 additions and 5 deletions
|
@ -61,7 +61,6 @@ li {list-style-type: none; }
|
||||||
* [The `time` library](time/index.html)
|
* [The `time` library](time/index.html)
|
||||||
* [The `uuid` 128-bit universally unique identifier library](uuid/index.html)
|
* [The `uuid` 128-bit universally unique identifier library](uuid/index.html)
|
||||||
* [The `url` library](url/index.html)
|
* [The `url` library](url/index.html)
|
||||||
* [The `workcache` library](workcache/index.html)
|
|
||||||
* [The `log` library](log/index.html)
|
* [The `log` library](log/index.html)
|
||||||
|
|
||||||
# Tooling
|
# Tooling
|
||||||
|
|
|
@ -14,11 +14,9 @@
|
||||||
//! These definitions are similar to their `ct` equivalents, but differ in that
|
//! These definitions are similar to their `ct` equivalents, but differ in that
|
||||||
//! these can be statically allocated and are slightly optimized for the runtime
|
//! these can be statically allocated and are slightly optimized for the runtime
|
||||||
|
|
||||||
#![allow(missing_doc)]
|
|
||||||
#![doc(hidden)]
|
|
||||||
|
|
||||||
use option::Option;
|
use option::Option;
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
pub enum Piece<'a> {
|
pub enum Piece<'a> {
|
||||||
String(&'a str),
|
String(&'a str),
|
||||||
// FIXME(#8259): this shouldn't require the unit-value here
|
// FIXME(#8259): this shouldn't require the unit-value here
|
||||||
|
@ -26,12 +24,14 @@ pub enum Piece<'a> {
|
||||||
Argument(Argument<'a>),
|
Argument(Argument<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
pub struct Argument<'a> {
|
pub struct Argument<'a> {
|
||||||
pub position: Position,
|
pub position: Position,
|
||||||
pub format: FormatSpec,
|
pub format: FormatSpec,
|
||||||
pub method: Option<&'a Method<'a>>
|
pub method: Option<&'a Method<'a>>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
pub struct FormatSpec {
|
pub struct FormatSpec {
|
||||||
pub fill: char,
|
pub fill: char,
|
||||||
pub align: Alignment,
|
pub align: Alignment,
|
||||||
|
@ -40,38 +40,60 @@ pub struct FormatSpec {
|
||||||
pub width: Count,
|
pub width: Count,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Possible alignments that can be requested as part of a formatting directive.
|
||||||
#[deriving(PartialEq)]
|
#[deriving(PartialEq)]
|
||||||
pub enum Alignment {
|
pub enum Alignment {
|
||||||
|
/// Indication that contents should be left-aligned.
|
||||||
AlignLeft,
|
AlignLeft,
|
||||||
|
/// Indication that contents should be right-aligned.
|
||||||
AlignRight,
|
AlignRight,
|
||||||
|
/// No alignment was requested.
|
||||||
AlignUnknown,
|
AlignUnknown,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
pub enum Count {
|
pub enum Count {
|
||||||
CountIs(uint), CountIsParam(uint), CountIsNextParam, CountImplied,
|
CountIs(uint), CountIsParam(uint), CountIsNextParam, CountImplied,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
pub enum Position {
|
pub enum Position {
|
||||||
ArgumentNext, ArgumentIs(uint)
|
ArgumentNext, ArgumentIs(uint)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Flags which can be passed to formatting via a directive.
|
||||||
|
///
|
||||||
|
/// These flags are discovered through the `flags` field of the `Formatter`
|
||||||
|
/// structure. The flag in that structure is a union of these flags into a
|
||||||
|
/// `uint` where each flag's discriminant is the corresponding bit.
|
||||||
pub enum Flag {
|
pub enum Flag {
|
||||||
|
/// A flag which enables number formatting to always print the sign of a
|
||||||
|
/// number.
|
||||||
FlagSignPlus,
|
FlagSignPlus,
|
||||||
|
/// Currently not a used flag
|
||||||
FlagSignMinus,
|
FlagSignMinus,
|
||||||
|
/// Indicates that the "alternate formatting" for a type should be used.
|
||||||
|
///
|
||||||
|
/// The meaning of this flag is type-specific.
|
||||||
FlagAlternate,
|
FlagAlternate,
|
||||||
|
/// Indicates that padding should be done with a `0` character as well as
|
||||||
|
/// being aware of the sign to be printed.
|
||||||
FlagSignAwareZeroPad,
|
FlagSignAwareZeroPad,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
pub enum Method<'a> {
|
pub enum Method<'a> {
|
||||||
Plural(Option<uint>, &'a [PluralArm<'a>], &'a [Piece<'a>]),
|
Plural(Option<uint>, &'a [PluralArm<'a>], &'a [Piece<'a>]),
|
||||||
Select(&'a [SelectArm<'a>], &'a [Piece<'a>]),
|
Select(&'a [SelectArm<'a>], &'a [Piece<'a>]),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
pub enum PluralSelector {
|
pub enum PluralSelector {
|
||||||
Keyword(PluralKeyword),
|
Keyword(PluralKeyword),
|
||||||
Literal(uint),
|
Literal(uint),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
pub enum PluralKeyword {
|
pub enum PluralKeyword {
|
||||||
Zero,
|
Zero,
|
||||||
One,
|
One,
|
||||||
|
@ -80,11 +102,13 @@ pub enum PluralKeyword {
|
||||||
Many,
|
Many,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
pub struct PluralArm<'a> {
|
pub struct PluralArm<'a> {
|
||||||
pub selector: PluralSelector,
|
pub selector: PluralSelector,
|
||||||
pub result: &'a [Piece<'a>],
|
pub result: &'a [Piece<'a>],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
pub struct SelectArm<'a> {
|
pub struct SelectArm<'a> {
|
||||||
pub selector: &'a str,
|
pub selector: &'a str,
|
||||||
pub result: &'a [Piece<'a>],
|
pub result: &'a [Piece<'a>],
|
||||||
|
|
|
@ -664,7 +664,10 @@
|
||||||
for (var j = 0; j < structs.length; j++) {
|
for (var j = 0; j < structs.length; j++) {
|
||||||
var code = $('<code>').append(structs[j]);
|
var code = $('<code>').append(structs[j]);
|
||||||
$.each(code.find('a'), function(idx, a) {
|
$.each(code.find('a'), function(idx, a) {
|
||||||
$(a).attr('href', rootPath + $(a).attr('href'));
|
var href = $(a).attr('href');
|
||||||
|
if (!href.startsWith('http')) {
|
||||||
|
$(a).attr('href', rootPath + $(a).attr('href'));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
var li = $('<li>').append(code);
|
var li = $('<li>').append(code);
|
||||||
list.append(li);
|
list.append(li);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue