From 0cf5083b24a9e71524ab90695c616d85cf3d4884 Mon Sep 17 00:00:00 2001 From: Florian Hartwig Date: Sat, 26 Dec 2015 00:01:10 +0100 Subject: [PATCH 1/4] Fix link that is currently broken due to bad markup --- src/libstd/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index e66cc49290adf..9c20a48d42518 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -76,7 +76,7 @@ //! `i32`](primitive.i32.html) that lists all the methods that can be called on //! 32-bit integers (very useful), and there is a [page for the module //! `std::i32`](i32/index.html) that documents the constant values [`MIN`] and -//! [`MAX`] (rarely useful). +//! [`MAX`](i32/constant.MAX.html) (rarely useful). //! //! Note the documentation for the primitives [`str`] and [`[T]`][slice] (also //! called 'slice'). Many method calls on [`String`] and [`Vec`] are actually @@ -153,7 +153,6 @@ //! //! [I/O]: io/index.html //! [`MIN`]: i32/constant.MIN.html -//! [`MAX`]: i32/constant.MAX.html //! [TCP]: net/struct.TcpStream.html //! [The Rust Prelude]: prelude/index.html //! [UDP]: net/struct.UdpSocket.html From 0fcf4710e9e4f84905b7dd6e9d4595454fd65bf7 Mon Sep 17 00:00:00 2001 From: Florian Hartwig Date: Sat, 26 Dec 2015 00:11:20 +0100 Subject: [PATCH 2/4] Fix links in docs for std::io --- src/libstd/io/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index cc3f8097a88e9..7be0f467ac9ff 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -237,7 +237,7 @@ //! to read the line and print it, so we use `()`. //! //! [result]: type.Result.html -//! [try]: macro.try!.html +//! [try]: ../macro.try!.html #![stable(feature = "rust1", since = "1.0.0")] @@ -992,8 +992,8 @@ pub trait Write { /// explicitly be called. The [`write!`][write] macro should be favored to /// invoke this method instead. /// - /// [formatargs]: ../std/macro.format_args!.html - /// [write]: ../std/macro.write!.html + /// [formatargs]: ../macro.format_args!.html + /// [write]: ../macro.write!.html /// /// This function internally uses the [`write_all`][writeall] method on /// this trait and hence will continuously write data so long as no errors @@ -1126,7 +1126,7 @@ pub trait Write { /// /// [`File`][file]s implement `Seek`: /// -/// [file]: ../std/fs/struct.File.html +/// [file]: ../fs/struct.File.html /// /// ``` /// use std::io; From 1fe2a77dd8b8bf29bef0a527339a3dbe4d50b254 Mon Sep 17 00:00:00 2001 From: Florian Hartwig Date: Sat, 26 Dec 2015 12:16:48 +0100 Subject: [PATCH 3/4] Fix some links in str docs --- src/libcollections/str.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs index 68669b68d294a..92c23ef2f38b8 100644 --- a/src/libcollections/str.rs +++ b/src/libcollections/str.rs @@ -640,7 +640,7 @@ impl str { /// Value, and may not match your idea of what a 'character' is. Iteration /// over grapheme clusters may be what you actually want. /// - /// [`char`]: ../primitive.char.html + /// [`char`]: primitive.char.html /// /// # Examples /// @@ -1551,7 +1551,7 @@ impl str { /// The pattern can be a `&str`, [`char`], or a closure that determines /// if a character matches. /// - /// [`char`]: primtive.char.html + /// [`char`]: primitive.char.html /// /// # Examples /// @@ -1643,7 +1643,7 @@ impl str { /// /// `parse()` can parse any type that implements the [`FromStr`] trait. /// - /// [`FromStr`]: trait.FromStr.html + /// [`FromStr`]: str/trait.FromStr.html /// /// # Failure /// From eaa94c52a12a2692d2a4ac6661a53fe90b3ea022 Mon Sep 17 00:00:00 2001 From: Florian Hartwig Date: Sat, 26 Dec 2015 22:04:18 +0100 Subject: [PATCH 4/4] Fix links in char docs --- src/libcore/char.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/libcore/char.rs b/src/libcore/char.rs index c02704217a8de..43a1bf6e500c0 100644 --- a/src/libcore/char.rs +++ b/src/libcore/char.rs @@ -69,7 +69,7 @@ const MAX_THREE_B: u32 = 0x10000; /// Point], but only ones within a certain range. `MAX` is the highest valid /// code point that's a valid [Unicode Scalar Value]. /// -/// [`char`]: primitive.char.html +/// [`char`]: ../primitive.char.html /// [Unicode Scalar Value]: http://www.unicode.org/glossary/#unicode_scalar_value /// [Code Point]: http://www.unicode.org/glossary/#code_point #[stable(feature = "rust1", since = "1.0.0")] @@ -91,9 +91,9 @@ pub const MAX: char = '\u{10ffff}'; /// [`char`]s. `from_u32()` will return `None` if the input is not a valid value /// for a [`char`]. /// -/// [`char`]: primitive.char.html -/// [`u32`]: primitive.u32.html -/// [`as`]: ../book/casting-between-types.html#as +/// [`char`]: ../primitive.char.html +/// [`u32`]: ../primitive.u32.html +/// [`as`]: ../../book/casting-between-types.html#as /// /// For an unsafe version of this function which ignores these checks, see /// [`from_u32_unchecked()`]. @@ -148,9 +148,9 @@ pub fn from_u32(i: u32) -> Option { /// [`char`]s. `from_u32_unchecked()` will ignore this, and blindly cast to /// [`char`], possibly creating an invalid one. /// -/// [`char`]: primitive.char.html -/// [`u32`]: primitive.u32.html -/// [`as`]: ../book/casting-between-types.html#as +/// [`char`]: ../primitive.char.html +/// [`u32`]: ../primitive.u32.html +/// [`as`]: ../../book/casting-between-types.html#as /// /// # Safety /// @@ -414,8 +414,8 @@ pub fn encode_utf16_raw(mut ch: u32, dst: &mut [u16]) -> Option { /// This `struct` is created by the [`escape_unicode()`] method on [`char`]. See /// its documentation for more. /// -/// [`escape_unicode()`]: primitive.char.html#method.escape_unicode -/// [`char`]: primitive.char.html +/// [`escape_unicode()`]: ../primitive.char.html#method.escape_unicode +/// [`char`]: ../primitive.char.html #[derive(Clone)] #[stable(feature = "rust1", since = "1.0.0")] pub struct EscapeUnicode { @@ -494,8 +494,8 @@ impl Iterator for EscapeUnicode { /// This `struct` is created by the [`escape_default()`] method on [`char`]. See /// its documentation for more. /// -/// [`escape_default()`]: primitive.char.html#method.escape_default -/// [`char`]: primitive.char.html +/// [`escape_default()`]: ../primitive.char.html#method.escape_default +/// [`char`]: ../primitive.char.html #[derive(Clone)] #[stable(feature = "rust1", since = "1.0.0")] pub struct EscapeDefault {