Skip to content

Commit 0dbfa5f

Browse files
committed
rustdoc: Fix some more broken links
1 parent c605c2b commit 0dbfa5f

File tree

3 files changed

+31
-5
lines changed

3 files changed

+31
-5
lines changed

src/doc/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ li {list-style-type: none; }
6161
* [The `time` library](time/index.html)
6262
* [The `uuid` 128-bit universally unique identifier library](uuid/index.html)
6363
* [The `url` library](url/index.html)
64-
* [The `workcache` library](workcache/index.html)
6564
* [The `log` library](log/index.html)
6665

6766
# Tooling

src/libcore/fmt/rt.rs

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,24 @@
1414
//! These definitions are similar to their `ct` equivalents, but differ in that
1515
//! these can be statically allocated and are slightly optimized for the runtime
1616
17-
#![allow(missing_doc)]
18-
#![doc(hidden)]
19-
2017
use option::Option;
2118

19+
#[doc(hidden)]
2220
pub enum Piece<'a> {
2321
String(&'a str),
2422
// FIXME(#8259): this shouldn't require the unit-value here
2523
CurrentArgument(()),
2624
Argument(Argument<'a>),
2725
}
2826

27+
#[doc(hidden)]
2928
pub struct Argument<'a> {
3029
pub position: Position,
3130
pub format: FormatSpec,
3231
pub method: Option<&'a Method<'a>>
3332
}
3433

34+
#[doc(hidden)]
3535
pub struct FormatSpec {
3636
pub fill: char,
3737
pub align: Alignment,
@@ -40,38 +40,60 @@ pub struct FormatSpec {
4040
pub width: Count,
4141
}
4242

43+
/// Possible alignments that can be requested as part of a formatting directive.
4344
#[deriving(PartialEq)]
4445
pub enum Alignment {
46+
/// Indication that contents should be left-aligned.
4547
AlignLeft,
48+
/// Indication that contents should be right-aligned.
4649
AlignRight,
50+
/// No alignment was requested.
4751
AlignUnknown,
4852
}
4953

54+
#[doc(hidden)]
5055
pub enum Count {
5156
CountIs(uint), CountIsParam(uint), CountIsNextParam, CountImplied,
5257
}
5358

59+
#[doc(hidden)]
5460
pub enum Position {
5561
ArgumentNext, ArgumentIs(uint)
5662
}
5763

64+
/// Flags which can be passed to formatting via a directive.
65+
///
66+
/// These flags are discovered through the `flags` field of the `Formatter`
67+
/// structure. The flag in that structure is a union of these flags into a
68+
/// `uint` where each flag's discriminant is the corresponding bit.
5869
pub enum Flag {
70+
/// A flag which enables number formatting to always print the sign of a
71+
/// number.
5972
FlagSignPlus,
73+
/// Currently not a used flag
6074
FlagSignMinus,
75+
/// Indicates that the "alternate formatting" for a type should be used.
76+
///
77+
/// The meaning of this flag is type-specific.
6178
FlagAlternate,
79+
/// Indicates that padding should be done with a `0` character as well as
80+
/// being aware of the sign to be printed.
6281
FlagSignAwareZeroPad,
6382
}
6483

84+
#[doc(hidden)]
6585
pub enum Method<'a> {
6686
Plural(Option<uint>, &'a [PluralArm<'a>], &'a [Piece<'a>]),
6787
Select(&'a [SelectArm<'a>], &'a [Piece<'a>]),
6888
}
6989

90+
#[doc(hidden)]
7091
pub enum PluralSelector {
7192
Keyword(PluralKeyword),
7293
Literal(uint),
7394
}
7495

96+
#[doc(hidden)]
7597
pub enum PluralKeyword {
7698
Zero,
7799
One,
@@ -80,11 +102,13 @@ pub enum PluralKeyword {
80102
Many,
81103
}
82104

105+
#[doc(hidden)]
83106
pub struct PluralArm<'a> {
84107
pub selector: PluralSelector,
85108
pub result: &'a [Piece<'a>],
86109
}
87110

111+
#[doc(hidden)]
88112
pub struct SelectArm<'a> {
89113
pub selector: &'a str,
90114
pub result: &'a [Piece<'a>],

src/librustdoc/html/static/main.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,10 @@
664664
for (var j = 0; j < structs.length; j++) {
665665
var code = $('<code>').append(structs[j]);
666666
$.each(code.find('a'), function(idx, a) {
667-
$(a).attr('href', rootPath + $(a).attr('href'));
667+
var href = $(a).attr('href');
668+
if (!href.startsWith('http')) {
669+
$(a).attr('href', rootPath + $(a).attr('href'));
670+
}
668671
});
669672
var li = $('<li>').append(code);
670673
list.append(li);

0 commit comments

Comments
 (0)