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