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