File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ use std:: collections:: HashSet ;
2
+
3
+ fn main ( ) { }
4
+
5
+ pub fn ice_3717 ( _: & HashSet < usize > ) {
6
+ let _ = [ 0u8 ; 0 ] ;
7
+ let _: HashSet < usize > = HashSet :: new ( ) ;
8
+ }
Original file line number Diff line number Diff line change
1
+ error: parameter of type `HashSet` should be generalized over different hashers
2
+ --> $DIR/ice-3717.rs:5:21
3
+ |
4
+ LL | pub fn ice_3717(_: &HashSet<usize>) {
5
+ | ^^^^^^^^^^^^^^
6
+ |
7
+ = note: `-D clippy::implicit-hasher` implied by `-D warnings`
8
+ help: consider adding a type parameter
9
+ |
10
+ LL | pub fn ice_3717<S: ::std::hash::BuildHasher + Default>(_: &HashSet<usize, S>) {
11
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
12
+ help: ...and use generic constructor
13
+ |
14
+ LL | let _: HashSet<usize> = HashSet::default();
15
+ | ^^^^^^^^^^^^^^^^^^
16
+
17
+ error: aborting due to previous error
18
+
You can’t perform that action at this time.
0 commit comments