]> git.lizzy.rs Git - rust.git/blob - tests/ui/fxhash.rs
Merge branch 'master' into rustfmt_tests
[rust.git] / tests / ui / fxhash.rs
1 // Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution.
3 //
4 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7 // option. This file may not be copied, modified, or distributed
8 // except according to those terms.
9
10 #![warn(clippy::default_hash_types)]
11 #![feature(rustc_private)]
12
13 extern crate rustc_data_structures;
14
15 use rustc_data_structures::fx::{FxHashMap, FxHashSet};
16 use std::collections::{HashMap, HashSet};
17
18 fn main() {
19     let _map: HashMap<String, String> = HashMap::default();
20     let _set: HashSet<String> = HashSet::default();
21
22     // test that the lint doesn't also match the Fx variants themselves ðŸ˜‚
23     let _fx_map: FxHashMap<String, String> = FxHashMap::default();
24     let _fx_set: FxHashSet<String> = FxHashSet::default();
25 }