]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/implicit_hasher.rs
Auto merge of #6336 - giraffate:sync-from-rust, r=flip1995
[rust.git] / tests / ui / implicit_hasher.rs
index ddcd8bcd755ae2eb1b14123e60b1a725ebf334a2..fdcc9a33f55fe93e2d5989f1757b2233c43c3d78 100644 (file)
@@ -1,14 +1,10 @@
-// Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
+// aux-build:implicit_hasher_macros.rs
+#![deny(clippy::implicit_hasher)]
 #![allow(unused)]
 
+#[macro_use]
+extern crate implicit_hasher_macros;
+
 use std::cmp::Eq;
 use std::collections::{HashMap, HashSet};
 use std::hash::{BuildHasher, Hash};
@@ -85,8 +81,8 @@ fn make() -> (Self, Self) {
         pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
     };
 }
-
-gen!(impl );
+#[rustfmt::skip]
+gen!(impl);
 gen!(fn bar);
 
 // When the macro is in a different file, the suggestion spans can't be combined properly
@@ -97,4 +93,7 @@ pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
 pub mod test_macro;
 __implicit_hasher_test_macro!(impl<K, V> for HashMap<K, V> where V: test_macro::A);
 
+// #4260
+implicit_hasher_fn!();
+
 fn main() {}