2019-02-16 15:41:06 -06:00
|
|
|
error: parameter of type `HashSet` should be generalized over different hashers
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/crashes/ice-3717.rs:7:21
|
2019-02-16 15:41:06 -06:00
|
|
|
|
|
|
|
|
LL | pub fn ice_3717(_: &HashSet<usize>) {
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
2020-04-02 21:09:30 -05:00
|
|
|
note: the lint level is defined here
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/crashes/ice-3717.rs:1:9
|
2020-04-02 21:09:30 -05:00
|
|
|
|
|
|
|
|
LL | #![deny(clippy::implicit_hasher)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
2019-02-16 15:41:06 -06:00
|
|
|
help: consider adding a type parameter
|
|
|
|
|
|
|
|
|
LL | pub fn ice_3717<S: ::std::hash::BuildHasher + Default>(_: &HashSet<usize, S>) {
|
2021-08-11 09:21:33 -05:00
|
|
|
| +++++++++++++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~
|
2019-02-16 15:41:06 -06:00
|
|
|
help: ...and use generic constructor
|
|
|
|
|
|
|
|
|
LL | let _: HashSet<usize> = HashSet::default();
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~~
|
2019-02-16 15:41:06 -06:00
|
|
|
|
2023-11-21 11:08:42 -06:00
|
|
|
error: aborting due to 1 previous error
|
2019-02-16 15:41:06 -06:00
|
|
|
|