mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-22 11:03:16 +00:00
21 lines
637 B
Text
21 lines
637 B
Text
error: parameter of type `HashSet` should be generalized over different hashers
|
|
--> tests/ui/crashes/ice-3717.rs:7:21
|
|
|
|
|
LL | pub fn ice_3717(_: &HashSet<usize>) {
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
note: the lint level is defined here
|
|
--> tests/ui/crashes/ice-3717.rs:1:9
|
|
|
|
|
LL | #![deny(clippy::implicit_hasher)]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
help: add a type parameter for `BuildHasher`
|
|
|
|
|
LL ~ pub fn ice_3717<S: ::std::hash::BuildHasher + Default>(_: &HashSet<usize, S>) {
|
|
LL |
|
|
LL | let _ = [0u8; 0];
|
|
LL ~ let _: HashSet<usize> = HashSet::default();
|
|
|
|
|
|
|
error: aborting due to 1 previous error
|
|
|