about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-09-08 04:14:54 +0000
committerbors <bors@rust-lang.org>2018-09-08 04:14:54 +0000
commit06da917b015a2eceac0e3cca22f9660edef25178 (patch)
tree8eef3df0e3912cabd16ee31bb6987ccb1db078b2 /src/libstd
parent295ad30ef452de5331edb5e0ee6f666f632758c4 (diff)
parentd5409141d62287b4597a7c05735406a2305fd134 (diff)
downloadrust-06da917b015a2eceac0e3cca22f9660edef25178.tar.gz
rust-06da917b015a2eceac0e3cca22f9660edef25178.zip
Auto merge of #51885 - GuillaumeGomez:trait-impl-show-docs, r=Mark-Simulacrum,QuietMisdreavus
Trait impl show docs

Fixes #51834.

<img width="1440" alt="screen shot 2018-06-29 at 00 14 33" src="https://user-images.githubusercontent.com/3050060/42063323-6e6e8cc8-7b31-11e8-88ef-4dd2229df76c.png">

(You can see both commit changes in the screenshot 😄)

r? @QuietMisdreavus
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/collections/hash/map.rs5
-rw-r--r--src/libstd/ffi/os_str.rs3
-rw-r--r--src/libstd/io/buffered.rs6
-rw-r--r--src/libstd/sync/mutex.rs2
-rw-r--r--src/libstd/sync/rwlock.rs2
5 files changed, 4 insertions, 14 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index 91912e5f241..3e54b502234 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -2655,9 +2655,8 @@ impl DefaultHasher {
 
 #[stable(feature = "hashmap_default_hasher", since = "1.13.0")]
 impl Default for DefaultHasher {
-    /// Creates a new `DefaultHasher` using [`new`]. See its documentation for more.
-    ///
-    /// [`new`]: #method.new
+    /// Creates a new `DefaultHasher` using [`new`][DefaultHasher::new].
+    /// See its documentation for more.
     fn default() -> DefaultHasher {
         DefaultHasher::new()
     }
diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs
index 6bcd62dbd59..8ae5e20dac5 100644
--- a/src/libstd/ffi/os_str.rs
+++ b/src/libstd/ffi/os_str.rs
@@ -351,9 +351,6 @@ impl From<String> for OsString {
     /// Converts a [`String`] into a [`OsString`].
     ///
     /// The conversion copies the data, and includes an allocation on the heap.
-    ///
-    /// [`String`]: ../string/struct.String.html
-    /// [`OsString`]: struct.OsString.html
     fn from(s: String) -> OsString {
         OsString { inner: Buf::from_string(s) }
     }
diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs
index 77bc7e946eb..e26e6d391f8 100644
--- a/src/libstd/io/buffered.rs
+++ b/src/libstd/io/buffered.rs
@@ -294,17 +294,15 @@ impl<R: Seek> Seek for BufReader<R> {
     /// `.into_inner()` immediately after a seek yields the underlying reader
     /// at the same position.
     ///
-    /// To seek without discarding the internal buffer, use [`seek_relative`].
+    /// To seek without discarding the internal buffer, use [`Seek::seek_relative`].
     ///
-    /// See `std::io::Seek` for more details.
+    /// See [`std::io::Seek`] for more details.
     ///
     /// Note: In the edge case where you're seeking with `SeekFrom::Current(n)`
     /// where `n` minus the internal buffer length overflows an `i64`, two
     /// seeks will be performed instead of one. If the second seek returns
     /// `Err`, the underlying reader will be left at the same position it would
     /// have if you called `seek` with `SeekFrom::Current(0)`.
-    ///
-    /// [`seek_relative`]: #method.seek_relative
     fn seek(&mut self, pos: SeekFrom) -> io::Result<u64> {
         let result: u64;
         if let SeekFrom::Current(n) = pos {
diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs
index e5a410644b9..54bfd8122b4 100644
--- a/src/libstd/sync/mutex.rs
+++ b/src/libstd/sync/mutex.rs
@@ -386,8 +386,6 @@ unsafe impl<#[may_dangle] T: ?Sized> Drop for Mutex<T> {
 impl<T> From<T> for Mutex<T> {
     /// Creates a new mutex in an unlocked state ready for use.
     /// This is equivalent to [`Mutex::new`].
-    ///
-    /// [`Mutex::new`]: #method.new
     fn from(t: T) -> Self {
         Mutex::new(t)
     }
diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs
index ed3a3865a6c..c0c706590db 100644
--- a/src/libstd/sync/rwlock.rs
+++ b/src/libstd/sync/rwlock.rs
@@ -461,8 +461,6 @@ impl<T: Default> Default for RwLock<T> {
 impl<T> From<T> for RwLock<T> {
     /// Creates a new instance of an `RwLock<T>` which is unlocked.
     /// This is equivalent to [`RwLock::new`].
-    ///
-    /// [`RwLock::new`]: #method.new
     fn from(t: T) -> Self {
         RwLock::new(t)
     }