]> git.lizzy.rs Git - rust.git/blob - src/libcollections/tests/lib.rs
rustdoc: Hide `self: Box<Self>` in list of deref methods
[rust.git] / src / libcollections / tests / 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(box_syntax)]
14 #![feature(inclusive_range_syntax)]
15 #![feature(collection_placement)]
16 #![feature(collections)]
17 #![feature(const_fn)]
18 #![feature(exact_size_is_empty)]
19 #![feature(pattern)]
20 #![feature(placement_in_syntax)]
21 #![feature(rand)]
22 #![feature(splice)]
23 #![feature(step_by)]
24 #![feature(str_escape)]
25 #![feature(test)]
26 #![feature(unboxed_closures)]
27 #![feature(unicode)]
28 #![feature(utf8_error_error_len)]
29
30 extern crate collections;
31 extern crate test;
32 extern crate std_unicode;
33 extern crate core;
34
35 use std::hash::{Hash, Hasher};
36 use std::collections::hash_map::DefaultHasher;
37
38 mod binary_heap;
39 mod btree;
40 mod cow_str;
41 mod fmt;
42 mod linked_list;
43 mod slice;
44 mod str;
45 mod string;
46 mod vec_deque;
47 mod vec;
48
49 fn hash<T: Hash>(t: &T) -> u64 {
50     let mut s = DefaultHasher::new();
51     t.hash(&mut s);
52     s.finish()
53 }