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.
This commit is contained in:
parent
ebb10a6131
commit
0867981f5e
@ -262,7 +262,7 @@ impl<K, Q: ?Sized> super::Recover<Q> for BTreeMap<K, ()>
|
||||
}
|
||||
}
|
||||
|
||||
/// An iterator over a BTreeMap's entries.
|
||||
/// An iterator over a `BTreeMap`'s entries.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct Iter<'a, K: 'a, V: 'a> {
|
||||
range: Range<'a, K, V>,
|
||||
@ -276,7 +276,7 @@ impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Iter<'a, K, V> {
|
||||
}
|
||||
}
|
||||
|
||||
/// A mutable iterator over a BTreeMap's entries.
|
||||
/// A mutable iterator over a `BTreeMap`'s entries.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[derive(Debug)]
|
||||
pub struct IterMut<'a, K: 'a, V: 'a> {
|
||||
@ -284,7 +284,7 @@ pub struct IterMut<'a, K: 'a, V: 'a> {
|
||||
length: usize,
|
||||
}
|
||||
|
||||
/// An owning iterator over a BTreeMap's entries.
|
||||
/// An owning iterator over a `BTreeMap`'s entries.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct IntoIter<K, V> {
|
||||
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> {
|
||||
}
|
||||
}
|
||||
|
||||
/// An iterator over a BTreeMap's keys.
|
||||
/// An iterator over a `BTreeMap`'s keys.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct Keys<'a, K: 'a, V: 'a> {
|
||||
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> {
|
||||
}
|
||||
}
|
||||
|
||||
/// An iterator over a BTreeMap's values.
|
||||
/// An iterator over a `BTreeMap`'s values.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct Values<'a, K: 'a, V: 'a> {
|
||||
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>
|
||||
}
|
||||
}
|
||||
|
||||
/// A mutable iterator over a BTreeMap's values.
|
||||
/// A mutable iterator over a `BTreeMap`'s values.
|
||||
#[stable(feature = "map_values_mut", since = "1.10.0")]
|
||||
#[derive(Debug)]
|
||||
pub struct ValuesMut<'a, K: 'a, V: 'a> {
|
||||
inner: IterMut<'a, K, V>,
|
||||
}
|
||||
|
||||
/// An iterator over a sub-range of BTreeMap's entries.
|
||||
/// An iterator over a sub-range of `BTreeMap`'s entries.
|
||||
#[stable(feature = "btree_range", since = "1.17.0")]
|
||||
pub struct Range<'a, K: 'a, V: 'a> {
|
||||
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>
|
||||
}
|
||||
}
|
||||
|
||||
/// A mutable iterator over a sub-range of BTreeMap's entries.
|
||||
/// A mutable iterator over a sub-range of `BTreeMap`'s entries.
|
||||
#[stable(feature = "btree_range", since = "1.17.0")]
|
||||
pub struct RangeMut<'a, K: 'a, V: 'a> {
|
||||
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,
|
||||
/// [`entry`]: struct.BTreeMap.html#method.entry
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub enum Entry<'a, K: 'a, V: 'a> {
|
||||
/// A vacant Entry
|
||||
/// A vacant `Entry`
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
Vacant(#[stable(feature = "rust1", since = "1.0.0")]
|
||||
VacantEntry<'a, K, V>),
|
||||
|
||||
/// An occupied Entry
|
||||
/// An occupied `Entry`
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
Occupied(#[stable(feature = "rust1", since = "1.0.0")]
|
||||
OccupiedEntry<'a, K, V>),
|
||||
@ -403,7 +403,7 @@ impl<'a, K: 'a + Debug + Ord, V: 'a + Debug> Debug for Entry<'a, K, V> {
|
||||
}
|
||||
}
|
||||
|
||||
/// A vacant Entry. It is part of the [`Entry`] enum.
|
||||
/// A vacant `Entry`. It is part of the [`Entry`] enum.
|
||||
///
|
||||
/// [`Entry`]: enum.Entry.html
|
||||
#[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> {
|
||||
}
|
||||
}
|
||||
|
||||
/// An occupied Entry. It is part of the [`Entry`] enum.
|
||||
/// An occupied `Entry`. It is part of the [`Entry`] enum.
|
||||
///
|
||||
/// [`Entry`]: enum.Entry.html
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
@ -215,7 +215,7 @@ impl<E: CLike> BitXor for EnumSet<E> {
|
||||
}
|
||||
}
|
||||
|
||||
/// An iterator over an EnumSet
|
||||
/// An iterator over an `EnumSet`
|
||||
pub struct Iter<E> {
|
||||
index: usize,
|
||||
bits: usize,
|
||||
|
@ -10,8 +10,8 @@
|
||||
|
||||
//! Collection types.
|
||||
//!
|
||||
//! See [std::collections](../std/collections/index.html) for a detailed discussion of
|
||||
//! collections in Rust.
|
||||
//! See [`std::collections`](../std/collections/index.html) for a detailed
|
||||
//! discussion of collections in Rust.
|
||||
|
||||
#![crate_name = "collections"]
|
||||
#![crate_type = "rlib"]
|
||||
|
@ -17,7 +17,7 @@
|
||||
use core::ops::{RangeFull, Range, RangeTo, RangeFrom, RangeInclusive, RangeToInclusive};
|
||||
use Bound::{self, Excluded, Included, Unbounded};
|
||||
|
||||
/// **RangeArgument** is implemented by Rust's built-in range types, produced
|
||||
/// `RangeArgument` is implemented by Rust's built-in range types, produced
|
||||
/// by range syntax like `..`, `a..`, `..b` or `c..d`.
|
||||
pub trait RangeArgument<T: ?Sized> {
|
||||
/// Start index bound.
|
||||
|
@ -8,7 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
//! VecDeque is a double-ended queue, which is implemented with the help of a
|
||||
//! `VecDeque` is a double-ended queue, which is implemented with the help of a
|
||||
//! growing ring buffer.
|
||||
//!
|
||||
//! 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 {
|
||||
index & (size - 1)
|
||||
}
|
||||
|
||||
/// Returns the two slices that cover the VecDeque's valid range
|
||||
/// Returns the two slices that cover the `VecDeque`'s valid range
|
||||
trait RingSlices: Sized {
|
||||
fn slice(self, from: usize, to: usize) -> Self;
|
||||
fn split_at(self, i: usize) -> (Self, Self);
|
||||
@ -2047,7 +2047,7 @@ impl<'a, T> ExactSizeIterator for IterMut<'a, T> {
|
||||
#[unstable(feature = "fused", issue = "35602")]
|
||||
impl<'a, T> FusedIterator for IterMut<'a, T> {}
|
||||
|
||||
/// A by-value VecDeque iterator
|
||||
/// A by-value `VecDeque` iterator
|
||||
#[derive(Clone)]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct IntoIter<T> {
|
||||
@ -2097,7 +2097,7 @@ impl<T> ExactSizeIterator for IntoIter<T> {
|
||||
#[unstable(feature = "fused", issue = "35602")]
|
||||
impl<T> FusedIterator for IntoIter<T> {}
|
||||
|
||||
/// A draining VecDeque iterator
|
||||
/// A draining `VecDeque` iterator
|
||||
#[stable(feature = "drain", since = "1.6.0")]
|
||||
pub struct Drain<'a, T: 'a> {
|
||||
after_tail: usize,
|
||||
|
Loading…
x
Reference in New Issue
Block a user