Skip to content

Commit 74fde5e

Browse files
committed
rollup merge of rust-lang#19802: jbranchaud/add-btreeset-new-doctest
2 parents 77d2a11 + 58125e5 commit 74fde5e

File tree

1 file changed

+8
-0
lines changed
  • src/libcollections/btree

1 file changed

+8
-0
lines changed

src/libcollections/btree/set.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ pub struct UnionItems<'a, T:'a> {
6565

6666
impl<T: Ord> BTreeSet<T> {
6767
/// Makes a new BTreeSet with a reasonable choice of B.
68+
///
69+
/// # Examples
70+
///
71+
/// ```
72+
/// use std::collections::BTreeSet;
73+
///
74+
/// let mut set: BTreeSet<int> = BTreeSet::new();
75+
/// ```
6876
#[unstable = "matches collection reform specification, waiting for dust to settle"]
6977
pub fn new() -> BTreeSet<T> {
7078
BTreeSet { map: BTreeMap::new() }

0 commit comments

Comments
 (0)