Skip to content

Commit 22bae87

Browse files
committed
Auto merge of #41178 - llogiq:collections-doc-markdown, r=frewsxcv
Apply clippy's doc_markdown improvements to libcollections Since my last PR led to linker failure, I'm now taking much smaller steps. This only fixes some doc_markdown warnings; as they are in comments only, we shouldn't get any problems building.
2 parents 13744ca + 0867981 commit 22bae87

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

src/libcollections/btree/map.rs

+12-12
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ impl<K, Q: ?Sized> super::Recover<Q> for BTreeMap<K, ()>
262262
}
263263
}
264264

265-
/// An iterator over a BTreeMap's entries.
265+
/// An iterator over a `BTreeMap`'s entries.
266266
#[stable(feature = "rust1", since = "1.0.0")]
267267
pub struct Iter<'a, K: 'a, V: 'a> {
268268
range: Range<'a, K, V>,
@@ -276,15 +276,15 @@ impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Iter<'a, K, V> {
276276
}
277277
}
278278

279-
/// A mutable iterator over a BTreeMap's entries.
279+
/// A mutable iterator over a `BTreeMap`'s entries.
280280
#[stable(feature = "rust1", since = "1.0.0")]
281281
#[derive(Debug)]
282282
pub struct IterMut<'a, K: 'a, V: 'a> {
283283
range: RangeMut<'a, K, V>,
284284
length: usize,
285285
}
286286

287-
/// An owning iterator over a BTreeMap's entries.
287+
/// An owning iterator over a `BTreeMap`'s entries.
288288
#[stable(feature = "rust1", since = "1.0.0")]
289289
pub struct IntoIter<K, V> {
290290
front: Handle<NodeRef<marker::Owned, K, V, marker::Leaf>, marker::Edge>,
@@ -303,7 +303,7 @@ impl<K: fmt::Debug, V: fmt::Debug> fmt::Debug for IntoIter<K, V> {
303303
}
304304
}
305305

306-
/// An iterator over a BTreeMap's keys.
306+
/// An iterator over a `BTreeMap`'s keys.
307307
#[stable(feature = "rust1", since = "1.0.0")]
308308
pub struct Keys<'a, K: 'a, V: 'a> {
309309
inner: Iter<'a, K, V>,
@@ -316,7 +316,7 @@ impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Keys<'a, K, V> {
316316
}
317317
}
318318

319-
/// An iterator over a BTreeMap's values.
319+
/// An iterator over a `BTreeMap`'s values.
320320
#[stable(feature = "rust1", since = "1.0.0")]
321321
pub struct Values<'a, K: 'a, V: 'a> {
322322
inner: Iter<'a, K, V>,
@@ -329,14 +329,14 @@ impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Values<'a, K, V>
329329
}
330330
}
331331

332-
/// A mutable iterator over a BTreeMap's values.
332+
/// A mutable iterator over a `BTreeMap`'s values.
333333
#[stable(feature = "map_values_mut", since = "1.10.0")]
334334
#[derive(Debug)]
335335
pub struct ValuesMut<'a, K: 'a, V: 'a> {
336336
inner: IterMut<'a, K, V>,
337337
}
338338

339-
/// An iterator over a sub-range of BTreeMap's entries.
339+
/// An iterator over a sub-range of `BTreeMap`'s entries.
340340
#[stable(feature = "btree_range", since = "1.17.0")]
341341
pub struct Range<'a, K: 'a, V: 'a> {
342342
front: Handle<NodeRef<marker::Immut<'a>, K, V, marker::Leaf>, marker::Edge>,
@@ -350,7 +350,7 @@ impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Range<'a, K, V>
350350
}
351351
}
352352

353-
/// A mutable iterator over a sub-range of BTreeMap's entries.
353+
/// A mutable iterator over a sub-range of `BTreeMap`'s entries.
354354
#[stable(feature = "btree_range", since = "1.17.0")]
355355
pub struct RangeMut<'a, K: 'a, V: 'a> {
356356
front: Handle<NodeRef<marker::Mut<'a>, K, V, marker::Leaf>, marker::Edge>,
@@ -378,12 +378,12 @@ impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for RangeMut<'a, K,
378378
/// [`entry`]: struct.BTreeMap.html#method.entry
379379
#[stable(feature = "rust1", since = "1.0.0")]
380380
pub enum Entry<'a, K: 'a, V: 'a> {
381-
/// A vacant Entry
381+
/// A vacant `Entry`
382382
#[stable(feature = "rust1", since = "1.0.0")]
383383
Vacant(#[stable(feature = "rust1", since = "1.0.0")]
384384
VacantEntry<'a, K, V>),
385385

386-
/// An occupied Entry
386+
/// An occupied `Entry`
387387
#[stable(feature = "rust1", since = "1.0.0")]
388388
Occupied(#[stable(feature = "rust1", since = "1.0.0")]
389389
OccupiedEntry<'a, K, V>),
@@ -403,7 +403,7 @@ impl<'a, K: 'a + Debug + Ord, V: 'a + Debug> Debug for Entry<'a, K, V> {
403403
}
404404
}
405405

406-
/// A vacant Entry. It is part of the [`Entry`] enum.
406+
/// A vacant `Entry`. It is part of the [`Entry`] enum.
407407
///
408408
/// [`Entry`]: enum.Entry.html
409409
#[stable(feature = "rust1", since = "1.0.0")]
@@ -425,7 +425,7 @@ impl<'a, K: 'a + Debug + Ord, V: 'a> Debug for VacantEntry<'a, K, V> {
425425
}
426426
}
427427

428-
/// An occupied Entry. It is part of the [`Entry`] enum.
428+
/// An occupied `Entry`. It is part of the [`Entry`] enum.
429429
///
430430
/// [`Entry`]: enum.Entry.html
431431
#[stable(feature = "rust1", since = "1.0.0")]

src/libcollections/enum_set.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ impl<E: CLike> BitXor for EnumSet<E> {
215215
}
216216
}
217217

218-
/// An iterator over an EnumSet
218+
/// An iterator over an `EnumSet`
219219
pub struct Iter<E> {
220220
index: usize,
221221
bits: usize,

src/libcollections/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
//! Collection types.
1212
//!
13-
//! See [std::collections](../std/collections/index.html) for a detailed discussion of
14-
//! collections in Rust.
13+
//! See [`std::collections`](../std/collections/index.html) for a detailed
14+
//! discussion of collections in Rust.
1515
1616
#![crate_name = "collections"]
1717
#![crate_type = "rlib"]

src/libcollections/range.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use core::ops::{RangeFull, Range, RangeTo, RangeFrom, RangeInclusive, RangeToInclusive};
1818
use Bound::{self, Excluded, Included, Unbounded};
1919

20-
/// **RangeArgument** is implemented by Rust's built-in range types, produced
20+
/// `RangeArgument` is implemented by Rust's built-in range types, produced
2121
/// by range syntax like `..`, `a..`, `..b` or `c..d`.
2222
pub trait RangeArgument<T: ?Sized> {
2323
/// Start index bound.

src/libcollections/vec_deque.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! VecDeque is a double-ended queue, which is implemented with the help of a
11+
//! `VecDeque` is a double-ended queue, which is implemented with the help of a
1212
//! growing ring buffer.
1313
//!
1414
//! This queue has `O(1)` amortized inserts and removals from both ends of the
@@ -1847,7 +1847,7 @@ fn wrap_index(index: usize, size: usize) -> usize {
18471847
index & (size - 1)
18481848
}
18491849

1850-
/// Returns the two slices that cover the VecDeque's valid range
1850+
/// Returns the two slices that cover the `VecDeque`'s valid range
18511851
trait RingSlices: Sized {
18521852
fn slice(self, from: usize, to: usize) -> Self;
18531853
fn split_at(self, i: usize) -> (Self, Self);
@@ -2047,7 +2047,7 @@ impl<'a, T> ExactSizeIterator for IterMut<'a, T> {
20472047
#[unstable(feature = "fused", issue = "35602")]
20482048
impl<'a, T> FusedIterator for IterMut<'a, T> {}
20492049

2050-
/// A by-value VecDeque iterator
2050+
/// A by-value `VecDeque` iterator
20512051
#[derive(Clone)]
20522052
#[stable(feature = "rust1", since = "1.0.0")]
20532053
pub struct IntoIter<T> {
@@ -2097,7 +2097,7 @@ impl<T> ExactSizeIterator for IntoIter<T> {
20972097
#[unstable(feature = "fused", issue = "35602")]
20982098
impl<T> FusedIterator for IntoIter<T> {}
20992099

2100-
/// A draining VecDeque iterator
2100+
/// A draining `VecDeque` iterator
21012101
#[stable(feature = "drain", since = "1.6.0")]
21022102
pub struct Drain<'a, T: 'a> {
21032103
after_tail: usize,

0 commit comments

Comments
 (0)