]> git.lizzy.rs Git - rust.git/commitdiff
Fix a few links in the docs
authorOliver Middleton <olliemail27@gmail.com>
Thu, 20 Oct 2016 23:49:47 +0000 (00:49 +0100)
committerOliver Middleton <olliemail27@gmail.com>
Thu, 20 Oct 2016 23:49:47 +0000 (00:49 +0100)
src/libcore/convert.rs
src/libcore/macros.rs
src/libcore/marker.rs
src/libcore/ops.rs
src/libstd/error.rs
src/libstd/io/cursor.rs
src/libstd/path.rs

index 5f16a4f2435f8549e49fec9d2016f33262d9ec2f..830bbc079ad1e81cc242c5dbf2f7771d16dc8f09 100644 (file)
@@ -145,7 +145,7 @@ pub trait AsMut<T: ?Sized> {
 ///
 /// # Generic Impls
 ///
-/// - `[From<T>][From] for U` implies `Into<U> for T`
+/// - [`From<T>`][From]` for U` implies `Into<U> for T`
 /// - [`into()`] is reflexive, which means that `Into<T> for T` is implemented
 ///
 /// [`TryInto`]: trait.TryInto.html
@@ -178,14 +178,14 @@ pub trait Into<T>: Sized {
 /// ```
 /// # Generic impls
 ///
-/// - `From<T> for U` implies `[Into<U>] for T`
+/// - `From<T> for U` implies [`Into<U>`]` for T`
 /// - [`from()`] is reflexive, which means that `From<T> for T` is implemented
 ///
 /// [`TryFrom`]: trait.TryFrom.html
 /// [`Option<T>`]: ../../std/option/enum.Option.html
 /// [`Result<T, E>`]: ../../std/result/enum.Result.html
 /// [`String`]: ../../std/string/struct.String.html
-/// [Into<U>]: trait.Into.html
+/// [`Into<U>`]: trait.Into.html
 /// [`from()`]: trait.From.html#tymethod.from
 #[stable(feature = "rust1", since = "1.0.0")]
 pub trait From<T>: Sized {
index 6e08abd34614386c41479764b91248ea788f23d0..d5b65d27a5a84244acc7ee168929b367bdccc55f 100644 (file)
@@ -42,12 +42,13 @@ macro_rules! panic {
 /// Unsafe code relies on `assert!` to enforce run-time invariants that, if
 /// violated could lead to unsafety.
 ///
-/// Other use-cases of `assert!` include
-/// [testing](https://doc.rust-lang.org/book/testing.html) and enforcing
-/// run-time invariants in safe code (whose violation cannot result in unsafety).
+/// Other use-cases of `assert!` include [testing] and enforcing run-time
+/// invariants in safe code (whose violation cannot result in unsafety).
 ///
 /// This macro has a second version, where a custom panic message can be provided.
 ///
+/// [testing]: ../book/testing.html
+///
 /// # Examples
 ///
 /// ```
index 03d8af1563d6de1e639bd7fc4ea73068acb077d9..bdb0dd8e7d1a9e0a371164c582b2aaa4af9276fe 100644 (file)
@@ -241,8 +241,8 @@ pub trait Unsize<T: ?Sized> {
 /// compile-time error. Specifically, with structs you'll get [E0204] and with enums you'll get
 /// [E0205].
 ///
-/// [E0204]: https://doc.rust-lang.org/error-index.html#E0204
-/// [E0205]: https://doc.rust-lang.org/error-index.html#E0205
+/// [E0204]: ../../error-index.html#E0204
+/// [E0205]: ../../error-index.html#E0205
 ///
 /// ## When *should* my type be `Copy`?
 ///
index 72e951a7c347c1f2c73f76c06d78e880c84472c2..0349f113762eb7624c0d9e75fac952eff2b54c4e 100644 (file)
@@ -182,11 +182,11 @@ pub trait Drop {
     /// After this function is over, the memory of `self` will be deallocated.
     ///
     /// This function cannot be called explicitly. This is compiler error
-    /// [0040]. However, the [`std::mem::drop`] function in the prelude can be
+    /// [E0040]. However, the [`std::mem::drop`] function in the prelude can be
     /// used to call the argument's `Drop` implementation.
     ///
-    /// [0040]: https://doc.rust-lang.org/error-index.html#E0040
-    /// [`std::mem::drop`]: https://doc.rust-lang.org/std/mem/fn.drop.html
+    /// [E0040]: ../../error-index.html#E0040
+    /// [`std::mem::drop`]: ../../std/mem/fn.drop.html
     ///
     /// # Panics
     ///
index a1909b0f957892dd69803768c1d1a4b9bcfe4509..454fa47cfbc99f4277cfab407759e5d18ad0c132 100644 (file)
@@ -69,7 +69,9 @@ pub trait Error: Debug + Display {
     /// It should not contain newlines or sentence-ending punctuation,
     /// to facilitate embedding in larger user-facing strings.
     /// For showing formatted error messages with more information see
-    /// [Display](https://doc.rust-lang.org/std/fmt/trait.Display.html).
+    /// [`Display`].
+    ///
+    /// [`Display`]: ../fmt/trait.Display.html
     ///
     /// # Examples
     ///
index ca9452ffe3eca04e43b10f8e6e2a44d30d5779cf..1fed061292b8e4951074676cf3961bf4e3e27cec 100644 (file)
@@ -23,7 +23,7 @@
 ///
 /// The standard library implements some I/O traits on various types which
 /// are commonly used as a buffer, like `Cursor<`[`Vec`]`<u8>>` and
-/// `Cursor<`[`&[u8]`]`>`.
+/// `Cursor<`[`&[u8]`][bytes]`>`.
 ///
 /// # Examples
 ///
@@ -35,7 +35,7 @@
 /// [`Read`]: ../../std/io/trait.Read.html
 /// [`Write`]: ../../std/io/trait.Write.html
 /// [`Vec`]: ../../std/vec/struct.Vec.html
-/// [`&[u8]`]: ../../std/primitive.slice.html
+/// [bytes]: ../../std/primitive.slice.html
 /// [`File`]: ../fs/struct.File.html
 ///
 /// ```no_run
index d6a5dfe5518003bf14630d28cbbf08a7cc21a2b6..34d1ed9e00a3ff2d9e9a21a512d65a524330ff7a 100644 (file)
@@ -914,6 +914,7 @@ fn cmp(&self, other: &Components<'a>) -> cmp::Ordering {
 /// [`Path`]: struct.Path.html
 /// [`push`]: struct.PathBuf.html#method.push
 /// [`set_extension`]: struct.PathBuf.html#method.set_extension
+/// [`Deref`]: ../ops/trait.Deref.html
 ///
 /// More details about the overall approach can be found in
 /// the module documentation.