Skip to content

Commit

Permalink
Auto merge of #41178 - llogiq:collections-doc-markdown, r=frewsxcv
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed Apr 10, 2017
2 parents 13744ca + 0867981 commit 22bae87
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
24 changes: 12 additions & 12 deletions src/libcollections/btree/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand All @@ -276,15 +276,15 @@ 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> {
range: RangeMut<'a, K, V>,
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>,
Expand All @@ -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>,
Expand All @@ -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>,
Expand All @@ -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>,
Expand All @@ -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>,
Expand Down Expand Up @@ -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>),
Expand All @@ -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")]
Expand All @@ -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")]
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/enum_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/libcollections/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions src/libcollections/vec_deque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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> {
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 22bae87

Please sign in to comment.