Skip to content

Commit 8faa503

Browse files
committed
Fix a few links in the docs
1 parent 7bccb82 commit 8faa503

File tree

7 files changed

+18
-14
lines changed

7 files changed

+18
-14
lines changed

src/libcore/convert.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ pub trait AsMut<T: ?Sized> {
145145
///
146146
/// # Generic Impls
147147
///
148-
/// - `[From<T>][From] for U` implies `Into<U> for T`
148+
/// - [`From<T>`][From]` for U` implies `Into<U> for T`
149149
/// - [`into()`] is reflexive, which means that `Into<T> for T` is implemented
150150
///
151151
/// [`TryInto`]: trait.TryInto.html
@@ -178,14 +178,14 @@ pub trait Into<T>: Sized {
178178
/// ```
179179
/// # Generic impls
180180
///
181-
/// - `From<T> for U` implies `[Into<U>] for T`
181+
/// - `From<T> for U` implies [`Into<U>`]` for T`
182182
/// - [`from()`] is reflexive, which means that `From<T> for T` is implemented
183183
///
184184
/// [`TryFrom`]: trait.TryFrom.html
185185
/// [`Option<T>`]: ../../std/option/enum.Option.html
186186
/// [`Result<T, E>`]: ../../std/result/enum.Result.html
187187
/// [`String`]: ../../std/string/struct.String.html
188-
/// [Into<U>]: trait.Into.html
188+
/// [`Into<U>`]: trait.Into.html
189189
/// [`from()`]: trait.From.html#tymethod.from
190190
#[stable(feature = "rust1", since = "1.0.0")]
191191
pub trait From<T>: Sized {

src/libcore/macros.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,13 @@ macro_rules! panic {
4242
/// Unsafe code relies on `assert!` to enforce run-time invariants that, if
4343
/// violated could lead to unsafety.
4444
///
45-
/// Other use-cases of `assert!` include
46-
/// [testing](https://doc.rust-lang.org/book/testing.html) and enforcing
47-
/// run-time invariants in safe code (whose violation cannot result in unsafety).
45+
/// Other use-cases of `assert!` include [testing] and enforcing run-time
46+
/// invariants in safe code (whose violation cannot result in unsafety).
4847
///
4948
/// This macro has a second version, where a custom panic message can be provided.
5049
///
50+
/// [testing]: ../book/testing.html
51+
///
5152
/// # Examples
5253
///
5354
/// ```

src/libcore/marker.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ pub trait Unsize<T: ?Sized> {
241241
/// compile-time error. Specifically, with structs you'll get [E0204] and with enums you'll get
242242
/// [E0205].
243243
///
244-
/// [E0204]: https://doc.rust-lang.org/error-index.html#E0204
245-
/// [E0205]: https://doc.rust-lang.org/error-index.html#E0205
244+
/// [E0204]: ../../error-index.html#E0204
245+
/// [E0205]: ../../error-index.html#E0205
246246
///
247247
/// ## When *should* my type be `Copy`?
248248
///

src/libcore/ops.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,11 @@ pub trait Drop {
182182
/// After this function is over, the memory of `self` will be deallocated.
183183
///
184184
/// This function cannot be called explicitly. This is compiler error
185-
/// [0040]. However, the [`std::mem::drop`] function in the prelude can be
185+
/// [E0040]. However, the [`std::mem::drop`] function in the prelude can be
186186
/// used to call the argument's `Drop` implementation.
187187
///
188-
/// [0040]: https://doc.rust-lang.org/error-index.html#E0040
189-
/// [`std::mem::drop`]: https://doc.rust-lang.org/std/mem/fn.drop.html
188+
/// [E0040]: ../../error-index.html#E0040
189+
/// [`std::mem::drop`]: ../../std/mem/fn.drop.html
190190
///
191191
/// # Panics
192192
///

src/libstd/error.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ pub trait Error: Debug + Display {
6969
/// It should not contain newlines or sentence-ending punctuation,
7070
/// to facilitate embedding in larger user-facing strings.
7171
/// For showing formatted error messages with more information see
72-
/// [Display](https://doc.rust-lang.org/std/fmt/trait.Display.html).
72+
/// [`Display`].
73+
///
74+
/// [`Display`]: ../fmt/trait.Display.html
7375
///
7476
/// # Examples
7577
///

src/libstd/io/cursor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use io::{self, SeekFrom, Error, ErrorKind};
2323
///
2424
/// The standard library implements some I/O traits on various types which
2525
/// are commonly used as a buffer, like `Cursor<`[`Vec`]`<u8>>` and
26-
/// `Cursor<`[`&[u8]`]`>`.
26+
/// `Cursor<`[`&[u8]`][bytes]`>`.
2727
///
2828
/// # Examples
2929
///
@@ -35,7 +35,7 @@ use io::{self, SeekFrom, Error, ErrorKind};
3535
/// [`Read`]: ../../std/io/trait.Read.html
3636
/// [`Write`]: ../../std/io/trait.Write.html
3737
/// [`Vec`]: ../../std/vec/struct.Vec.html
38-
/// [`&[u8]`]: ../../std/primitive.slice.html
38+
/// [bytes]: ../../std/primitive.slice.html
3939
/// [`File`]: ../fs/struct.File.html
4040
///
4141
/// ```no_run

src/libstd/path.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -914,6 +914,7 @@ impl<'a> cmp::Ord for Components<'a> {
914914
/// [`Path`]: struct.Path.html
915915
/// [`push`]: struct.PathBuf.html#method.push
916916
/// [`set_extension`]: struct.PathBuf.html#method.set_extension
917+
/// [`Deref`]: ../ops/trait.Deref.html
917918
///
918919
/// More details about the overall approach can be found in
919920
/// the module documentation.

0 commit comments

Comments
 (0)