]> git.lizzy.rs Git - rust.git/commitdiff
Fix invalid urls
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Sun, 1 Jul 2018 16:51:39 +0000 (18:51 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Thu, 6 Sep 2018 21:32:30 +0000 (23:32 +0200)
src/liballoc/rc.rs
src/liballoc/string.rs
src/liballoc/sync.rs
src/libcore/option.rs
src/libcore/result.rs
src/libstd/collections/hash/map.rs
src/libstd/io/buffered.rs
src/libstd/sync/mutex.rs
src/libstd/sync/rwlock.rs

index 4860daa11e20c2f96a57ebc6a6e4a4ea8b16fc87..e9e390d831f6b40ccc3da55952c3cbeaaec83d03 100644 (file)
@@ -806,9 +806,7 @@ unsafe impl<#[may_dangle] T: ?Sized> Drop for Rc<T> {
     ///
     /// This will decrement the strong reference count. If the strong reference
     /// count reaches zero then the only other references (if any) are
-    /// [`Weak`][weak], so we `drop` the inner value.
-    ///
-    /// [weak]: struct.Weak.html
+    /// [`Weak`], so we `drop` the inner value.
     ///
     /// # Examples
     ///
@@ -1173,9 +1171,8 @@ impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {}
 
 impl<T> Weak<T> {
     /// Constructs a new `Weak<T>`, without allocating any memory.
-    /// Calling [`upgrade`] on the return value always gives [`None`].
+    /// Calling [`upgrade`][Weak::upgrade] on the return value always gives [`None`].
     ///
-    /// [`upgrade`]: struct.Weak.html#method.upgrade
     /// [`None`]: ../../std/option/enum.Option.html
     ///
     /// # Examples
@@ -1321,9 +1318,8 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 #[stable(feature = "downgraded_weak", since = "1.10.0")]
 impl<T> Default for Weak<T> {
     /// Constructs a new `Weak<T>`, allocating memory for `T` without initializing
-    /// it. Calling [`upgrade`] on the return value always gives [`None`].
+    /// it. Calling [`upgrade`][Weak::upgrade] on the return value always gives [`None`].
     ///
-    /// [`upgrade`]: struct.Weak.html#method.upgrade
     /// [`None`]: ../../std/option/enum.Option.html
     ///
     /// # Examples
index aa821abb34cdfe5f38e3880f28b71b522b2d972a..837e17cf640173b127fce5cd2758c1ad361e9aa7 100644 (file)
@@ -1927,9 +1927,7 @@ fn add(mut self, other: &str) -> String {
 
 /// Implements the `+=` operator for appending to a `String`.
 ///
-/// This has the same behavior as the [`push_str`] method.
-///
-/// [`push_str`]: struct.String.html#method.push_str
+/// This has the same behavior as the [`push_str`][String::push_str] method.
 #[stable(feature = "stringaddassign", since = "1.12.0")]
 impl<'a> AddAssign<&'a str> for String {
     #[inline]
index db7a4044b267f7eedc0cecf47473790d73e4adbf..fc6b7a29677b38bf3faabf4d22becee6064e524f 100644 (file)
@@ -916,9 +916,7 @@ unsafe impl<#[may_dangle] T: ?Sized> Drop for Arc<T> {
     ///
     /// This will decrement the strong reference count. If the strong reference
     /// count reaches zero then the only other references (if any) are
-    /// [`Weak`][weak], so we `drop` the inner value.
-    ///
-    /// [weak]: struct.Weak.html
+    /// [`Weak`], so we `drop` the inner value.
     ///
     /// # Examples
     ///
@@ -1159,9 +1157,9 @@ fn clone(&self) -> Weak<T> {
 #[stable(feature = "downgraded_weak", since = "1.10.0")]
 impl<T> Default for Weak<T> {
     /// Constructs a new `Weak<T>`, without allocating memory.
-    /// Calling [`upgrade`] on the return value always gives [`None`].
+    /// Calling [`upgrade`][Weak::upgrade] on the return value always
+    /// gives [`None`].
     ///
-    /// [`upgrade`]: struct.Weak.html#method.upgrade
     /// [`None`]: ../../std/option/enum.Option.html#variant.None
     ///
     /// # Examples
index 3879abb0af973d7084c911f93c660cc686288d08..53cf626bb1ca02b93ef084b003de7c7138f538ba 100644 (file)
@@ -1006,9 +1006,7 @@ fn expect_failed(msg: &str) -> ! {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T> Default for Option<T> {
-    /// Returns [`None`].
-    ///
-    /// [`None`]: #variant.None
+    /// Returns [`None`][Option::None].
     #[inline]
     fn default() -> Option<T> { None }
 }
@@ -1228,9 +1226,10 @@ unsafe impl<A> TrustedLen for IntoIter<A> {}
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<A, V: FromIterator<A>> FromIterator<Option<A>> for Option<V> {
-    /// Takes each element in the [`Iterator`]: if it is [`None`], no further
-    /// elements are taken, and the [`None`] is returned. Should no [`None`] occur, a
-    /// container with the values of each `Option` is returned.
+    /// Takes each element in the [`Iterator`]: if it is [`None`][Option::None],
+    /// no further elements are taken, and the [`None`][Option::None] is
+    /// returned. Should no [`None`][Option::None] occur, a container with the
+    /// values of each [`Option`] is returned.
     ///
     /// Here is an example which increments every integer in a vector,
     /// checking for overflow:
@@ -1247,7 +1246,6 @@ impl<A, V: FromIterator<A>> FromIterator<Option<A>> for Option<V> {
     /// ```
     ///
     /// [`Iterator`]: ../iter/trait.Iterator.html
-    /// [`None`]: enum.Option.html#variant.None
     #[inline]
     fn from_iter<I: IntoIterator<Item=Option<A>>>(iter: I) -> Option<V> {
         // FIXME(#11084): This could be replaced with Iterator::scan when this
index ac908342655b6ea88229c123dd63a05e72f407c2..c4b4a0fd72a680e012619260d706d131c2a2f1b6 100644 (file)
@@ -507,7 +507,7 @@ pub fn map_err<F, O: FnOnce(E) -> F>(self, op: O) -> Result<T,F> {
 
     /// Returns an iterator over the possibly contained value.
     ///
-    /// The iterator yields one value if the result is [`Ok`], otherwise none.
+    /// The iterator yields one value if the result is [`Result::Ok`], otherwise none.
     ///
     /// # Examples
     ///
@@ -520,8 +520,6 @@ pub fn map_err<F, O: FnOnce(E) -> F>(self, op: O) -> Result<T,F> {
     /// let x: Result<u32, &str> = Err("nothing!");
     /// assert_eq!(x.iter().next(), None);
     /// ```
-    ///
-    /// [`Ok`]: enum.Result.html#variant.Ok
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn iter(&self) -> Iter<T> {
@@ -530,7 +528,7 @@ pub fn iter(&self) -> Iter<T> {
 
     /// Returns a mutable iterator over the possibly contained value.
     ///
-    /// The iterator yields one value if the result is [`Ok`], otherwise none.
+    /// The iterator yields one value if the result is [`Result::Ok`], otherwise none.
     ///
     /// # Examples
     ///
@@ -547,8 +545,6 @@ pub fn iter(&self) -> Iter<T> {
     /// let mut x: Result<u32, &str> = Err("nothing!");
     /// assert_eq!(x.iter_mut().next(), None);
     /// ```
-    ///
-    /// [`Ok`]: enum.Result.html#variant.Ok
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn iter_mut(&mut self) -> IterMut<T> {
@@ -994,7 +990,7 @@ impl<T, E> IntoIterator for Result<T, E> {
 
     /// Returns a consuming iterator over the possibly contained value.
     ///
-    /// The iterator yields one value if the result is [`Ok`], otherwise none.
+    /// The iterator yields one value if the result is [`Result::Ok`], otherwise none.
     ///
     /// # Examples
     ///
@@ -1009,8 +1005,6 @@ impl<T, E> IntoIterator for Result<T, E> {
     /// let v: Vec<u32> = x.into_iter().collect();
     /// assert_eq!(v, []);
     /// ```
-    ///
-    /// [`Ok`]: enum.Result.html#variant.Ok
     #[inline]
     fn into_iter(self) -> IntoIter<T> {
         IntoIter { inner: self.ok() }
index 91912e5f2412ef75eb59c25abba89f0574174c00..3e54b502234ff6da129f34b56576f96d172f8161 100644 (file)
@@ -2655,9 +2655,8 @@ pub fn new() -> 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()
     }
index 77bc7e946eb41bfd4419ec704c1859c14eced5b8..e26e6d391f84d3f12bee12a774746e5506811d09 100644 (file)
@@ -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 {
index e5a410644b907ce6e4f39d426237798d8deb875e..54bfd8122b4ed4a764e1b3b0ea92ca190298f865 100644 (file)
@@ -386,8 +386,6 @@ fn drop(&mut self) {
 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)
     }
index ed3a3865a6caee0f2b5d0d49bd4204f479dc10f6..c0c706590db945a7eb03574db26e7ad6d062a04f 100644 (file)
@@ -461,8 +461,6 @@ fn default() -> 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)
     }