]> git.lizzy.rs Git - rust.git/blob - src/libcollectionstest/lib.rs
Rollup merge of #31199 - steveklabnik:gh31181, r=Manishearth
[rust.git] / src / libcollectionstest / lib.rs
1 // Copyright 2015 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 #![feature(ascii)]
12 #![feature(binary_heap_extras)]
13 #![feature(box_syntax)]
14 #![feature(btree_range)]
15 #![feature(collections)]
16 #![feature(collections_bound)]
17 #![feature(const_fn)]
18 #![feature(fn_traits)]
19 #![feature(deque_extras)]
20 #![feature(drain)]
21 #![feature(enumset)]
22 #![feature(into_cow)]
23 #![feature(iter_arith)]
24 #![feature(pattern)]
25 #![feature(rand)]
26 #![feature(range_inclusive)]
27 #![feature(rustc_private)]
28 #![feature(set_recovery)]
29 #![feature(slice_bytes)]
30 #![feature(slice_splits)]
31 #![feature(step_by)]
32 #![feature(str_char)]
33 #![feature(str_escape)]
34 #![feature(str_match_indices)]
35 #![feature(str_utf16)]
36 #![feature(test)]
37 #![feature(unboxed_closures)]
38 #![feature(unicode)]
39 #![feature(vec_push_all)]
40
41 #[macro_use] extern crate log;
42
43 extern crate collections;
44 extern crate test;
45 extern crate rustc_unicode;
46
47 use std::hash::{Hash, Hasher, SipHasher};
48
49 #[cfg(test)] #[macro_use] mod bench;
50
51 mod binary_heap;
52 mod btree;
53 mod enum_set;
54 mod fmt;
55 mod linked_list;
56 mod slice;
57 mod str;
58 mod string;
59 mod vec_deque;
60 mod vec;
61
62 fn hash<T: Hash>(t: &T) -> u64 {
63     let mut s = SipHasher::new();
64     t.hash(&mut s);
65     s.finish()
66 }