2019-02-16 21:41:06 +00:00
|
|
|
error: parameter of type `HashSet` should be generalized over different hashers
|
2024-08-07 12:43:52 +00:00
|
|
|
--> tests/ui/crashes/ice-3717.rs:7:21
|
2019-02-16 21:41:06 +00:00
|
|
|
|
|
|
|
|
LL | pub fn ice_3717(_: &HashSet<usize>) {
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
2020-04-03 02:09:30 +00:00
|
|
|
note: the lint level is defined here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/crashes/ice-3717.rs:1:9
|
2020-04-03 02:09:30 +00:00
|
|
|
|
|
|
|
|
LL | #![deny(clippy::implicit_hasher)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
2024-07-29 17:42:58 +00:00
|
|
|
help: add a type parameter for `BuildHasher`
|
2019-02-16 21:41:06 +00:00
|
|
|
|
|
2024-07-29 17:42:58 +00:00
|
|
|
LL ~ pub fn ice_3717<S: ::std::hash::BuildHasher + Default>(_: &HashSet<usize, S>) {
|
|
|
|
LL |
|
|
|
|
LL | let _ = [0u8; 0];
|
|
|
|
LL ~ let _: HashSet<usize> = HashSet::default();
|
2019-02-16 21:41:06 +00:00
|
|
|
|
|
|
|
|
|
2023-11-21 17:08:42 +00:00
|
|
|
error: aborting due to 1 previous error
|
2019-02-16 21:41:06 +00:00
|
|
|
|