1 // Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
13 //! See [std::collections](../std/collections) for a detailed discussion of
14 //! collections in Rust.
16 // Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
17 #![cfg_attr(stage0, feature(custom_attribute))]
18 #![crate_name = "collections"]
20 #![crate_type = "rlib"]
21 #![unstable(feature = "collections",
22 reason
= "library is unlikely to be stabilized with the current \
23 layout and name, use std::collections instead")]
24 #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
25 html_favicon_url
= "https://doc.rust-lang.org/favicon.ico",
26 html_root_url
= "http://doc.rust-lang.org/nightly/",
27 html_playground_url
= "http://play.rust-lang.org/",
28 test(no_crate_inject
))]
30 #![allow(trivial_casts)]
31 #![cfg_attr(test, allow(deprecated))] // rand
34 #![feature(box_patterns)]
36 #![feature(box_syntax)]
38 #![feature(core_intrinsics)]
39 #![feature(core_prelude)]
40 #![feature(core_slice_ext)]
41 #![feature(core_str_ext)]
45 #![feature(iter_order)]
46 #![feature(iter_arith)]
47 #![feature(iter_arith)]
48 #![feature(lang_items)]
49 #![feature(num_bits_bytes)]
52 #![feature(ptr_as_ref)]
54 #![feature(slice_patterns)]
55 #![feature(staged_api)]
58 #![feature(str_match_indices)]
59 #![feature(unboxed_closures)]
62 #![feature(unsafe_no_drop_flag, filling_drop)]
63 #![feature(utf8_error)]
64 #![cfg_attr(test, feature(rand, test))]
65 #![cfg_attr(not(test), feature(str_words))]
73 extern crate rustc_unicode
;
76 #[cfg(test)] #[macro_use] extern crate std;
77 #[cfg(test)] extern crate test;
79 pub use binary_heap
::BinaryHeap
;
80 pub use bit_vec
::BitVec
;
81 pub use bit_set
::BitSet
;
82 pub use btree_map
::BTreeMap
;
83 pub use btree_set
::BTreeSet
;
84 pub use linked_list
::LinkedList
;
85 pub use enum_set
::EnumSet
;
86 pub use vec_deque
::VecDeque
;
87 pub use string
::String
;
89 pub use vec_map
::VecMap
;
91 // Needed for the vec! macro
112 #[unstable(feature = "bitvec", reason = "RFC 509")]
114 pub use bit
::{BitVec, Iter}
;
117 #[unstable(feature = "bitset", reason = "RFC 509")]
119 pub use bit
::{BitSet, Union, Intersection, Difference, SymmetricDifference}
;
120 pub use bit
::SetIter
as Iter
;
123 #[stable(feature = "rust1", since = "1.0.0")]
125 pub use btree
::map
::*;
128 #[stable(feature = "rust1", since = "1.0.0")]
130 pub use btree
::set
::*;
134 // FIXME(#14344) this shouldn't be necessary
136 #[unstable(feature = "issue_14344_fixme")]
137 pub fn fixme_14344_be_sure_to_link_to_collections() {}
141 pub use core
::ops
; // RangeFull
144 /// An endpoint of a range of keys.
145 #[unstable(feature = "collections_bound")]
146 #[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)]
148 /// An inclusive bound.
150 /// An exclusive bound.
152 /// An infinite endpoint. Indicates that there is no bound in this direction.