From 73bd0ba91efe68b3d2932d7a2abbdde7308d0738 Mon Sep 17 00:00:00 2001 From: Ted Mielczarek Date: Wed, 30 Sep 2015 12:33:38 -0400 Subject: [PATCH 1/2] Fix module links in std::fmt and the Rust book's documentation chapter. 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). --- src/doc/trpl/documentation.md | 4 ++-- src/libcore/fmt/mod.rs | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/doc/trpl/documentation.md b/src/doc/trpl/documentation.md index 0a471beb43914..5afb9b7f868c8 100644 --- a/src/doc/trpl/documentation.md +++ b/src/doc/trpl/documentation.md @@ -45,7 +45,7 @@ Rust keeps track of these comments, and uses them when generating documentation. This is important when documenting things like enums: ```rust -/// The `Option` type. See [the module level documentation](../) for more. +/// The `Option` type. See [the module level documentation](index.html) for more. enum Option { /// No value None, @@ -57,7 +57,7 @@ enum Option { The above works, but this does not: ```rust,ignore -/// The `Option` type. See [the module level documentation](../) for more. +/// The `Option` type. See [the module level documentation](index.html) for more. enum Option { None, /// No value Some(T), /// Some value `T` diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs index 8c596eb3e997b..65206f42b3933 100644 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@ -298,7 +298,7 @@ impl<'a> Display for Arguments<'a> { /// /// For more information on formatters, see [the module-level documentation][module]. /// -/// [module]: ../index.html +/// [module]: index.html /// /// # Examples /// @@ -393,7 +393,7 @@ pub trait Debug { /// /// For more information on formatters, see [the module-level documentation][module]. /// -/// [module]: ../index.html +/// [module]: index.html /// /// # Examples /// @@ -435,7 +435,7 @@ pub trait Display { /// /// For more information on formatters, see [the module-level documentation][module]. /// -/// [module]: ../index.html +/// [module]: index.html /// /// # Examples /// @@ -482,7 +482,7 @@ pub trait Octal { /// /// For more information on formatters, see [the module-level documentation][module]. /// -/// [module]: ../index.html +/// [module]: index.html /// /// # Examples /// @@ -530,7 +530,7 @@ pub trait Binary { /// /// For more information on formatters, see [the module-level documentation][module]. /// -/// [module]: ../index.html +/// [module]: index.html /// /// # Examples /// @@ -578,7 +578,7 @@ pub trait LowerHex { /// /// For more information on formatters, see [the module-level documentation][module]. /// -/// [module]: ../index.html +/// [module]: index.html /// /// # Examples /// @@ -624,7 +624,7 @@ pub trait UpperHex { /// /// For more information on formatters, see [the module-level documentation][module]. /// -/// [module]: ../index.html +/// [module]: index.html /// /// # Examples /// @@ -668,7 +668,7 @@ pub trait Pointer { /// /// For more information on formatters, see [the module-level documentation][module]. /// -/// [module]: ../index.html +/// [module]: index.html /// /// # Examples /// @@ -711,7 +711,7 @@ pub trait LowerExp { /// /// For more information on formatters, see [the module-level documentation][module]. /// -/// [module]: ../index.html +/// [module]: index.html /// /// # Examples /// From 49fa11c5a5fef15b49abf0a22b0991f1b6ed114b Mon Sep 17 00:00:00 2001 From: Ted Mielczarek Date: Wed, 30 Sep 2015 13:24:39 -0400 Subject: [PATCH 2/2] Fix module links from core::fmt::* to go to std::fmt --- src/libcore/fmt/mod.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs index 65206f42b3933..69fa0fa1609e3 100644 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@ -298,7 +298,7 @@ impl<'a> Display for Arguments<'a> { /// /// For more information on formatters, see [the module-level documentation][module]. /// -/// [module]: index.html +/// [module]: ../../std/fmt/index.html /// /// # Examples /// @@ -393,7 +393,7 @@ pub trait Debug { /// /// For more information on formatters, see [the module-level documentation][module]. /// -/// [module]: index.html +/// [module]: ../../std/fmt/index.html /// /// # Examples /// @@ -435,7 +435,7 @@ pub trait Display { /// /// For more information on formatters, see [the module-level documentation][module]. /// -/// [module]: index.html +/// [module]: ../../std/fmt/index.html /// /// # Examples /// @@ -482,7 +482,7 @@ pub trait Octal { /// /// For more information on formatters, see [the module-level documentation][module]. /// -/// [module]: index.html +/// [module]: ../../std/fmt/index.html /// /// # Examples /// @@ -530,7 +530,7 @@ pub trait Binary { /// /// For more information on formatters, see [the module-level documentation][module]. /// -/// [module]: index.html +/// [module]: ../../std/fmt/index.html /// /// # Examples /// @@ -578,7 +578,7 @@ pub trait LowerHex { /// /// For more information on formatters, see [the module-level documentation][module]. /// -/// [module]: index.html +/// [module]: ../../std/fmt/index.html /// /// # Examples /// @@ -624,7 +624,7 @@ pub trait UpperHex { /// /// For more information on formatters, see [the module-level documentation][module]. /// -/// [module]: index.html +/// [module]: ../../std/fmt/index.html /// /// # Examples /// @@ -668,7 +668,7 @@ pub trait Pointer { /// /// For more information on formatters, see [the module-level documentation][module]. /// -/// [module]: index.html +/// [module]: ../../std/fmt/index.html /// /// # Examples /// @@ -711,7 +711,7 @@ pub trait LowerExp { /// /// For more information on formatters, see [the module-level documentation][module]. /// -/// [module]: index.html +/// [module]: ../../std/fmt/index.html /// /// # Examples ///