File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 1+ #![deny(clippy::implicit_hasher)]
2+
3+ use std::collections::HashSet;
4+
5+ fn main() {}
6+
7+ pub fn ice_3717<S: ::std::hash::BuildHasher + Default>(_: &HashSet<usize, S>) {
8+ //~^ ERROR: parameter of type `HashSet` should be generalized over different hashers
9+ let _ = [0u8; 0];
10+ let _: HashSet<usize> = HashSet::default();
11+ }
Original file line number Diff line number Diff line change 11#![ deny( clippy:: implicit_hasher) ]
22
3- //@no-rustfix: need to change the suggestion to a multipart suggestion
4-
53use std:: collections:: HashSet ;
64
75fn main ( ) { }
Original file line number Diff line number Diff line change 11error: parameter of type `HashSet` should be generalized over different hashers
2- --> tests/ui/crashes/ice-3717.rs:9 :21
2+ --> tests/ui/crashes/ice-3717.rs:7 :21
33 |
44LL | pub fn ice_3717(_: &HashSet<usize>) {
55 | ^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments