Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix module links in std::fmt and the Rust book's documentation chapter. #28754

Merged
merged 2 commits into from
Sep 30, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/doc/trpl/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<T> {
/// No value
None,
Expand All @@ -57,7 +57,7 @@ enum Option<T> {
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<T> {
None, /// No value
Some(T), /// Some value `T`
Expand Down
18 changes: 9 additions & 9 deletions src/libcore/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ impl<'a> Display for Arguments<'a> {
///
/// For more information on formatters, see [the module-level documentation][module].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We actually don't have any info here either. http://doc.rust-lang.org/nightly/core/fmt/index.html

Should link to ../../std/fmt/index.html, perhaps?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I was looking at http://doc.rust-lang.org/nightly/std/fmt/trait.Display.html, which with my patch winds up linking to http://doc.rust-lang.org/nightly/std/fmt/index.html. I didn't realize the docs would wind up in two places.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, libstd is mostly reexports of other, possibly unstable crates (collections, core, alloc).

///
/// [module]: ../index.html
/// [module]: ../../std/fmt/index.html
///
/// # Examples
///
Expand Down Expand Up @@ -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
///
Expand Down Expand Up @@ -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
///
Expand Down Expand Up @@ -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
///
Expand Down Expand Up @@ -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
///
Expand Down Expand Up @@ -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
///
Expand Down Expand Up @@ -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
///
Expand Down Expand Up @@ -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
///
Expand Down Expand Up @@ -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
///
Expand Down