]> git.lizzy.rs Git - rust.git/blob - src/libcollectionstest/lib.rs
Auto merge of #31620 - alexcrichton:fix-out-of-tree-builds, r=brson
[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(const_fn)]
20 #![feature(fn_traits)]
21 #![feature(enumset)]
22 #![feature(iter_arith)]
23 #![feature(pattern)]
24 #![feature(rand)]
25 #![feature(rustc_private)]
26 #![feature(set_recovery)]
27 #![feature(slice_bytes)]
28 #![feature(step_by)]
29 #![feature(str_char)]
30 #![feature(str_escape)]
31 #![feature(str_utf16)]
32 #![feature(test)]
33 #![feature(unboxed_closures)]
34 #![feature(unicode)]
35
36 #[macro_use] extern crate log;
37
38 extern crate collections;
39 extern crate test;
40 extern crate rustc_unicode;
41
42 use std::hash::{Hash, Hasher, SipHasher};
43
44 #[cfg(test)] #[macro_use] mod bench;
45
46 mod binary_heap;
47 mod btree;
48 mod enum_set;
49 mod fmt;
50 mod linked_list;
51 mod slice;
52 mod str;
53 mod string;
54 mod vec_deque;
55 mod vec;
56
57 fn hash<T: Hash>(t: &T) -> u64 {
58     let mut s = SipHasher::new();
59     t.hash(&mut s);
60     s.finish()
61 }