]> git.lizzy.rs Git - rust.git/blob - src/libcollections/lib.rs
Remove alternate stack with sigaltstack before unmapping it.
[rust.git] / src / libcollections / lib.rs
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.
4 //
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.
10
11 //! Collection types.
12 //!
13 //! See [std::collections](../std/collections/index.html) for a detailed discussion of
14 //! collections in Rust.
15
16 #![crate_name = "collections"]
17 #![crate_type = "rlib"]
18 #![unstable(feature = "collections",
19             reason = "library is unlikely to be stabilized with the current \
20                       layout and name, use std::collections instead",
21             issue = "27783")]
22 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
23        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
24        html_root_url = "https://doc.rust-lang.org/nightly/",
25        html_playground_url = "https://play.rust-lang.org/",
26        issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/",
27        test(no_crate_inject, attr(allow(unused_variables), deny(warnings))))]
28
29 #![cfg_attr(test, allow(deprecated))] // rand
30 #![cfg_attr(not(stage0), deny(warnings))]
31
32 #![feature(alloc)]
33 #![feature(box_patterns)]
34 #![feature(box_syntax)]
35 #![feature(core_intrinsics)]
36 #![feature(decode_utf16)]
37 #![feature(drop_in_place)]
38 #![feature(dropck_parametricity)]
39 #![feature(fmt_internals)]
40 #![feature(fmt_radix)]
41 #![feature(heap_api)]
42 #![feature(iter_arith)]
43 #![feature(iter_arith)]
44 #![feature(lang_items)]
45 #![feature(nonzero)]
46 #![feature(num_bits_bytes)]
47 #![feature(pattern)]
48 #![feature(shared)]
49 #![feature(slice_bytes)]
50 #![feature(slice_patterns)]
51 #![feature(staged_api)]
52 #![feature(step_by)]
53 #![feature(str_char)]
54 #![feature(unboxed_closures)]
55 #![feature(unicode)]
56 #![feature(unique)]
57 #![feature(unsafe_no_drop_flag)]
58 #![cfg_attr(test, feature(rand, test))]
59
60 #![no_std]
61
62 extern crate rustc_unicode;
63 extern crate alloc;
64
65 #[cfg(test)]
66 #[macro_use]
67 extern crate std;
68 #[cfg(test)]
69 extern crate test;
70
71 pub use binary_heap::BinaryHeap;
72 pub use btree_map::BTreeMap;
73 pub use btree_set::BTreeSet;
74 pub use linked_list::LinkedList;
75 pub use enum_set::EnumSet;
76 pub use vec_deque::VecDeque;
77 pub use string::String;
78 pub use vec::Vec;
79
80 // Needed for the vec! macro
81 pub use alloc::boxed;
82
83 #[macro_use]
84 mod macros;
85
86 pub mod binary_heap;
87 mod btree;
88 pub mod borrow;
89 pub mod enum_set;
90 pub mod fmt;
91 pub mod linked_list;
92 pub mod range;
93 pub mod slice;
94 pub mod str;
95 pub mod string;
96 pub mod vec;
97 pub mod vec_deque;
98
99 #[stable(feature = "rust1", since = "1.0.0")]
100 pub mod btree_map {
101     #[stable(feature = "rust1", since = "1.0.0")]
102     pub use btree::map::*;
103 }
104
105 #[stable(feature = "rust1", since = "1.0.0")]
106 pub mod btree_set {
107     #[stable(feature = "rust1", since = "1.0.0")]
108     pub use btree::set::*;
109 }
110
111 #[cfg(not(test))]
112 mod std {
113     pub use core::ops;      // RangeFull
114 }
115
116 /// An endpoint of a range of keys.
117 #[unstable(feature = "collections_bound", issue = "27787")]
118 #[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)]
119 pub enum Bound<T> {
120     /// An inclusive bound.
121     Included(T),
122     /// An exclusive bound.
123     Excluded(T),
124     /// An infinite endpoint. Indicates that there is no bound in this direction.
125     Unbounded,
126 }