about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2022-07-05 17:42:11 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2022-07-05 21:33:39 +0200
commit53db831d62481dd0b1f74e2109c50d31d9f75c62 (patch)
tree2643127210f36d4cbf9953c710434bb9b5e3795f
parent6fa68c9b44f5b5032be0388c8f4085842c584c15 (diff)
downloadrust-53db831d62481dd0b1f74e2109c50d31d9f75c62.tar.gz
rust-53db831d62481dd0b1f74e2109c50d31d9f75c62.zip
Fix links in std/core documentation
-rw-r--r--library/core/src/char/convert.rs4
-rw-r--r--library/core/src/hash/mod.rs2
-rw-r--r--library/core/src/option.rs6
-rw-r--r--library/core/src/result.rs6
4 files changed, 9 insertions, 9 deletions
diff --git a/library/core/src/char/convert.rs b/library/core/src/char/convert.rs
index 778f06aeb63..7c5f82f5ea4 100644
--- a/library/core/src/char/convert.rs
+++ b/library/core/src/char/convert.rs
@@ -93,7 +93,7 @@ impl const From<char> for u128 {
 /// Map `char` with code point in U+0000..=U+00FF to byte in 0x00..=0xFF with same value, failing
 /// if the code point is greater than U+00FF.
 ///
-/// See [`impl From<u8> for char`](char#impl-From<u8>) for details on the encoding.
+/// See [`impl From<u8> for char`](char#impl-From<u8>-for-char) for details on the encoding.
 #[stable(feature = "u8_from_char", since = "1.59.0")]
 impl TryFrom<char> for u8 {
     type Error = TryFromCharError;
@@ -229,7 +229,7 @@ impl TryFrom<u32> for char {
 
 /// The error type returned when a conversion from [`prim@u32`] to [`prim@char`] fails.
 ///
-/// This `struct` is created by the [`char::try_from<u32>`](char#impl-TryFrom<u32>) method.
+/// This `struct` is created by the [`char::try_from<u32>`](char#impl-TryFrom<u32>-for-char) method.
 /// See its documentation for more.
 #[stable(feature = "try_from", since = "1.34.0")]
 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
diff --git a/library/core/src/hash/mod.rs b/library/core/src/hash/mod.rs
index 1e4c22aea10..cf428e0b1cf 100644
--- a/library/core/src/hash/mod.rs
+++ b/library/core/src/hash/mod.rs
@@ -180,7 +180,7 @@ mod sip;
 /// [`HashMap`]: ../../std/collections/struct.HashMap.html
 /// [`HashSet`]: ../../std/collections/struct.HashSet.html
 /// [`hash`]: Hash::hash
-/// [impl]: ../../std/primitive.str.html#impl-Hash
+/// [impl]: ../../std/primitive.str.html#impl-Hash-for-str
 #[stable(feature = "rust1", since = "1.0.0")]
 #[rustc_diagnostic_item = "Hash"]
 pub trait Hash {
diff --git a/library/core/src/option.rs b/library/core/src/option.rs
index 28ea45ed235..bca73cb770f 100644
--- a/library/core/src/option.rs
+++ b/library/core/src/option.rs
@@ -389,7 +389,7 @@
 //! [`Option`] of a collection of each contained value of the original
 //! [`Option`] values, or [`None`] if any of the elements was [`None`].
 //!
-//! [impl-FromIterator]: Option#impl-FromIterator%3COption%3CA%3E%3E
+//! [impl-FromIterator]: Option#impl-FromIterator%3COption%3CA%3E%3E-for-Option%3CV%3E
 //!
 //! ```
 //! let v = [Some(2), Some(4), None, Some(8)];
@@ -405,8 +405,8 @@
 //! to provide the [`product`][Iterator::product] and
 //! [`sum`][Iterator::sum] methods.
 //!
-//! [impl-Product]: Option#impl-Product%3COption%3CU%3E%3E
-//! [impl-Sum]: Option#impl-Sum%3COption%3CU%3E%3E
+//! [impl-Product]: Option#impl-Product%3COption%3CU%3E%3E-for-Option%3CT%3E
+//! [impl-Sum]: Option#impl-Sum%3COption%3CU%3E%3E-for-Option%3CT%3E
 //!
 //! ```
 //! let v = [None, Some(1), Some(2), Some(3)];
diff --git a/library/core/src/result.rs b/library/core/src/result.rs
index c4dc34fff97..8a68cdf7d65 100644
--- a/library/core/src/result.rs
+++ b/library/core/src/result.rs
@@ -459,7 +459,7 @@
 //! [`Result`] of a collection of each contained value of the original
 //! [`Result`] values, or [`Err`] if any of the elements was [`Err`].
 //!
-//! [impl-FromIterator]: Result#impl-FromIterator%3CResult%3CA%2C%20E%3E%3E
+//! [impl-FromIterator]: Result#impl-FromIterator%3CResult%3CA%2C%20E%3E%3E-for-Result%3CV%2C%20E%3E
 //!
 //! ```
 //! let v = [Ok(2), Ok(4), Err("err!"), Ok(8)];
@@ -475,8 +475,8 @@
 //! to provide the [`product`][Iterator::product] and
 //! [`sum`][Iterator::sum] methods.
 //!
-//! [impl-Product]: Result#impl-Product%3CResult%3CU%2C%20E%3E%3E
-//! [impl-Sum]: Result#impl-Sum%3CResult%3CU%2C%20E%3E%3E
+//! [impl-Product]: Result#impl-Product%3CResult%3CU%2C%20E%3E%3E-for-Result%3CT%2C%20E%3E
+//! [impl-Sum]: Result#impl-Sum%3CResult%3CU%2C%20E%3E%3E-for-Result%3CT%2C%20E%3E
 //!
 //! ```
 //! let v = [Err("error!"), Ok(1), Ok(2), Ok(3), Err("foo")];