Skip to content

Fix various dead links in std docs #30570

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

Merged
merged 4 commits into from
Dec 28, 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
6 changes: 3 additions & 3 deletions src/libcollections/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down Expand Up @@ -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
///
Expand Down Expand Up @@ -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
///
Expand Down
22 changes: 11 additions & 11 deletions src/libcore/char.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand All @@ -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()`].
Expand Down Expand Up @@ -148,9 +148,9 @@ pub fn from_u32(i: u32) -> Option<char> {
/// [`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
///
Expand Down Expand Up @@ -414,8 +414,8 @@ pub fn encode_utf16_raw(mut ch: u32, dst: &mut [u16]) -> Option<usize> {
/// 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 {
Expand Down Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions src/libstd/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions src/libstd/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>`] are actually
Expand Down Expand Up @@ -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
Expand Down