Skip to content

Commit 0d669a9

Browse files
authored
Rollup merge of #74453 - Manishearth:intra-doc-std, r=jyn514
Use intra-doc links in `str` and `BTreeSet` Fixes #32129, fixes #32130 A _slight_ degradation in quality is that the `#method.foo` links would previously link to the same page on `String`'s documentation, and now they will navigate to `str`. Not a big deal IMO, and we can also try to improve that.
2 parents 9597744 + 748634e commit 0d669a9

File tree

2 files changed

+80
-168
lines changed

2 files changed

+80
-168
lines changed

src/liballoc/collections/btree/set.rs

+7-15
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ use super::Recover;
2222
/// to any other item, as determined by the [`Ord`] trait, changes while it is in the set. This is
2323
/// normally only possible through [`Cell`], [`RefCell`], global state, I/O, or unsafe code.
2424
///
25-
/// [`BTreeMap`]: struct.BTreeMap.html
2625
/// [`Ord`]: ../../std/cmp/trait.Ord.html
2726
/// [`Cell`]: ../../std/cell/struct.Cell.html
2827
/// [`RefCell`]: ../../std/cell/struct.RefCell.html
@@ -78,8 +77,7 @@ impl<T: Clone> Clone for BTreeSet<T> {
7877
/// This `struct` is created by the [`iter`] method on [`BTreeSet`].
7978
/// See its documentation for more.
8079
///
81-
/// [`BTreeSet`]: struct.BTreeSet.html
82-
/// [`iter`]: struct.BTreeSet.html#method.iter
80+
/// [`iter`]: BTreeSet::iter
8381
#[stable(feature = "rust1", since = "1.0.0")]
8482
pub struct Iter<'a, T: 'a> {
8583
iter: Keys<'a, T, ()>,
@@ -97,8 +95,7 @@ impl<T: fmt::Debug> fmt::Debug for Iter<'_, T> {
9795
/// This `struct` is created by the [`into_iter`] method on [`BTreeSet`]
9896
/// (provided by the `IntoIterator` trait). See its documentation for more.
9997
///
100-
/// [`BTreeSet`]: struct.BTreeSet.html
101-
/// [`into_iter`]: struct.BTreeSet.html#method.into_iter
98+
/// [`into_iter`]: BTreeSet#method.into_iter
10299
#[stable(feature = "rust1", since = "1.0.0")]
103100
#[derive(Debug)]
104101
pub struct IntoIter<T> {
@@ -110,8 +107,7 @@ pub struct IntoIter<T> {
110107
/// This `struct` is created by the [`range`] method on [`BTreeSet`].
111108
/// See its documentation for more.
112109
///
113-
/// [`BTreeSet`]: struct.BTreeSet.html
114-
/// [`range`]: struct.BTreeSet.html#method.range
110+
/// [`range`]: BTreeSet::range
115111
#[derive(Debug)]
116112
#[stable(feature = "btree_range", since = "1.17.0")]
117113
pub struct Range<'a, T: 'a> {
@@ -194,8 +190,7 @@ where
194190
/// This `struct` is created by the [`difference`] method on [`BTreeSet`].
195191
/// See its documentation for more.
196192
///
197-
/// [`BTreeSet`]: struct.BTreeSet.html
198-
/// [`difference`]: struct.BTreeSet.html#method.difference
193+
/// [`difference`]: BTreeSet::difference
199194
#[stable(feature = "rust1", since = "1.0.0")]
200195
pub struct Difference<'a, T: 'a> {
201196
inner: DifferenceInner<'a, T>,
@@ -227,8 +222,7 @@ impl<T: fmt::Debug> fmt::Debug for Difference<'_, T> {
227222
/// This `struct` is created by the [`symmetric_difference`] method on
228223
/// [`BTreeSet`]. See its documentation for more.
229224
///
230-
/// [`BTreeSet`]: struct.BTreeSet.html
231-
/// [`symmetric_difference`]: struct.BTreeSet.html#method.symmetric_difference
225+
/// [`symmetric_difference`]: BTreeSet::symmetric_difference
232226
#[stable(feature = "rust1", since = "1.0.0")]
233227
pub struct SymmetricDifference<'a, T: 'a>(MergeIterInner<Iter<'a, T>>);
234228

@@ -244,8 +238,7 @@ impl<T: fmt::Debug> fmt::Debug for SymmetricDifference<'_, T> {
244238
/// This `struct` is created by the [`intersection`] method on [`BTreeSet`].
245239
/// See its documentation for more.
246240
///
247-
/// [`BTreeSet`]: struct.BTreeSet.html
248-
/// [`intersection`]: struct.BTreeSet.html#method.intersection
241+
/// [`intersection`]: BTreeSet::intersection
249242
#[stable(feature = "rust1", since = "1.0.0")]
250243
pub struct Intersection<'a, T: 'a> {
251244
inner: IntersectionInner<'a, T>,
@@ -277,8 +270,7 @@ impl<T: fmt::Debug> fmt::Debug for Intersection<'_, T> {
277270
/// This `struct` is created by the [`union`] method on [`BTreeSet`].
278271
/// See its documentation for more.
279272
///
280-
/// [`BTreeSet`]: struct.BTreeSet.html
281-
/// [`union`]: struct.BTreeSet.html#method.union
273+
/// [`union`]: BTreeSet::union
282274
#[stable(feature = "rust1", since = "1.0.0")]
283275
pub struct Union<'a, T: 'a>(MergeIterInner<Iter<'a, T>>);
284276

0 commit comments

Comments
 (0)