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