Skip to content

Commit bd652ed

Browse files
Rollup merge of rust-lang#98939 - GuillaumeGomez:rustdoc-disamb-impls, r=notriddle
rustdoc: Add more semantic information to impl IDs Take over of rust-lang#92745. I fixed the last remaining issue for the links in the sidebar (mentioned by `@jsha)` and fixed the few links broken in the std/core docs. cc `@camelid` r? `@notriddle`
2 parents 4fc07b7 + 9409e81 commit bd652ed

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

core/src/char/convert.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ impl const From<char> for u128 {
9393
/// Map `char` with code point in U+0000..=U+00FF to byte in 0x00..=0xFF with same value, failing
9494
/// if the code point is greater than U+00FF.
9595
///
96-
/// See [`impl From<u8> for char`](char#impl-From<u8>) for details on the encoding.
96+
/// See [`impl From<u8> for char`](char#impl-From<u8>-for-char) for details on the encoding.
9797
#[stable(feature = "u8_from_char", since = "1.59.0")]
9898
impl TryFrom<char> for u8 {
9999
type Error = TryFromCharError;
@@ -229,7 +229,7 @@ impl TryFrom<u32> for char {
229229

230230
/// The error type returned when a conversion from [`prim@u32`] to [`prim@char`] fails.
231231
///
232-
/// This `struct` is created by the [`char::try_from<u32>`](char#impl-TryFrom<u32>) method.
232+
/// This `struct` is created by the [`char::try_from<u32>`](char#impl-TryFrom<u32>-for-char) method.
233233
/// See its documentation for more.
234234
#[stable(feature = "try_from", since = "1.34.0")]
235235
#[derive(Copy, Clone, Debug, PartialEq, Eq)]

core/src/hash/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ mod sip;
180180
/// [`HashMap`]: ../../std/collections/struct.HashMap.html
181181
/// [`HashSet`]: ../../std/collections/struct.HashSet.html
182182
/// [`hash`]: Hash::hash
183-
/// [impl]: ../../std/primitive.str.html#impl-Hash
183+
/// [impl]: ../../std/primitive.str.html#impl-Hash-for-str
184184
#[stable(feature = "rust1", since = "1.0.0")]
185185
#[rustc_diagnostic_item = "Hash"]
186186
pub trait Hash {

core/src/option.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@
389389
//! [`Option`] of a collection of each contained value of the original
390390
//! [`Option`] values, or [`None`] if any of the elements was [`None`].
391391
//!
392-
//! [impl-FromIterator]: Option#impl-FromIterator%3COption%3CA%3E%3E
392+
//! [impl-FromIterator]: Option#impl-FromIterator%3COption%3CA%3E%3E-for-Option%3CV%3E
393393
//!
394394
//! ```
395395
//! let v = [Some(2), Some(4), None, Some(8)];
@@ -405,8 +405,8 @@
405405
//! to provide the [`product`][Iterator::product] and
406406
//! [`sum`][Iterator::sum] methods.
407407
//!
408-
//! [impl-Product]: Option#impl-Product%3COption%3CU%3E%3E
409-
//! [impl-Sum]: Option#impl-Sum%3COption%3CU%3E%3E
408+
//! [impl-Product]: Option#impl-Product%3COption%3CU%3E%3E-for-Option%3CT%3E
409+
//! [impl-Sum]: Option#impl-Sum%3COption%3CU%3E%3E-for-Option%3CT%3E
410410
//!
411411
//! ```
412412
//! let v = [None, Some(1), Some(2), Some(3)];

core/src/result.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@
459459
//! [`Result`] of a collection of each contained value of the original
460460
//! [`Result`] values, or [`Err`] if any of the elements was [`Err`].
461461
//!
462-
//! [impl-FromIterator]: Result#impl-FromIterator%3CResult%3CA%2C%20E%3E%3E
462+
//! [impl-FromIterator]: Result#impl-FromIterator%3CResult%3CA%2C%20E%3E%3E-for-Result%3CV%2C%20E%3E
463463
//!
464464
//! ```
465465
//! let v = [Ok(2), Ok(4), Err("err!"), Ok(8)];
@@ -475,8 +475,8 @@
475475
//! to provide the [`product`][Iterator::product] and
476476
//! [`sum`][Iterator::sum] methods.
477477
//!
478-
//! [impl-Product]: Result#impl-Product%3CResult%3CU%2C%20E%3E%3E
479-
//! [impl-Sum]: Result#impl-Sum%3CResult%3CU%2C%20E%3E%3E
478+
//! [impl-Product]: Result#impl-Product%3CResult%3CU%2C%20E%3E%3E-for-Result%3CT%2C%20E%3E
479+
//! [impl-Sum]: Result#impl-Sum%3CResult%3CU%2C%20E%3E%3E-for-Result%3CT%2C%20E%3E
480480
//!
481481
//! ```
482482
//! let v = [Err("error!"), Ok(1), Ok(2), Ok(3), Err("foo")];

0 commit comments

Comments
 (0)