Skip to content

Commit 27254bc

Browse files
committed
Rollup merge of #28754 - luser:fix-rustdoc-module-links, r=Manishearth
The links in the rustdoc for several places in fmt were trying to link to the std::fmt module but actually linking to std, which was confusing. While trying to figure out why I noticed that the documentation chapter of the Rust book has examples that show this same bug (although it doesn't seem widespread in practice). r? @steveklabnik
2 parents c03be23 + 49fa11c commit 27254bc

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/doc/trpl/documentation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Rust keeps track of these comments, and uses them when generating
4545
documentation. This is important when documenting things like enums:
4646

4747
```rust
48-
/// The `Option` type. See [the module level documentation](../) for more.
48+
/// The `Option` type. See [the module level documentation](index.html) for more.
4949
enum Option<T> {
5050
/// No value
5151
None,
@@ -57,7 +57,7 @@ enum Option<T> {
5757
The above works, but this does not:
5858

5959
```rust,ignore
60-
/// The `Option` type. See [the module level documentation](../) for more.
60+
/// The `Option` type. See [the module level documentation](index.html) for more.
6161
enum Option<T> {
6262
None, /// No value
6363
Some(T), /// Some value `T`

src/libcore/fmt/mod.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ impl<'a> Display for Arguments<'a> {
298298
///
299299
/// For more information on formatters, see [the module-level documentation][module].
300300
///
301-
/// [module]: ../index.html
301+
/// [module]: ../../std/fmt/index.html
302302
///
303303
/// # Examples
304304
///
@@ -393,7 +393,7 @@ pub trait Debug {
393393
///
394394
/// For more information on formatters, see [the module-level documentation][module].
395395
///
396-
/// [module]: ../index.html
396+
/// [module]: ../../std/fmt/index.html
397397
///
398398
/// # Examples
399399
///
@@ -435,7 +435,7 @@ pub trait Display {
435435
///
436436
/// For more information on formatters, see [the module-level documentation][module].
437437
///
438-
/// [module]: ../index.html
438+
/// [module]: ../../std/fmt/index.html
439439
///
440440
/// # Examples
441441
///
@@ -482,7 +482,7 @@ pub trait Octal {
482482
///
483483
/// For more information on formatters, see [the module-level documentation][module].
484484
///
485-
/// [module]: ../index.html
485+
/// [module]: ../../std/fmt/index.html
486486
///
487487
/// # Examples
488488
///
@@ -530,7 +530,7 @@ pub trait Binary {
530530
///
531531
/// For more information on formatters, see [the module-level documentation][module].
532532
///
533-
/// [module]: ../index.html
533+
/// [module]: ../../std/fmt/index.html
534534
///
535535
/// # Examples
536536
///
@@ -578,7 +578,7 @@ pub trait LowerHex {
578578
///
579579
/// For more information on formatters, see [the module-level documentation][module].
580580
///
581-
/// [module]: ../index.html
581+
/// [module]: ../../std/fmt/index.html
582582
///
583583
/// # Examples
584584
///
@@ -624,7 +624,7 @@ pub trait UpperHex {
624624
///
625625
/// For more information on formatters, see [the module-level documentation][module].
626626
///
627-
/// [module]: ../index.html
627+
/// [module]: ../../std/fmt/index.html
628628
///
629629
/// # Examples
630630
///
@@ -668,7 +668,7 @@ pub trait Pointer {
668668
///
669669
/// For more information on formatters, see [the module-level documentation][module].
670670
///
671-
/// [module]: ../index.html
671+
/// [module]: ../../std/fmt/index.html
672672
///
673673
/// # Examples
674674
///
@@ -711,7 +711,7 @@ pub trait LowerExp {
711711
///
712712
/// For more information on formatters, see [the module-level documentation][module].
713713
///
714-
/// [module]: ../index.html
714+
/// [module]: ../../std/fmt/index.html
715715
///
716716
/// # Examples
717717
///

0 commit comments

Comments
 (0)