mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-13 09:05:00 +00:00
c2c73189c8
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
23 lines
746 B
Plaintext
23 lines
746 B
Plaintext
error: parameter of type `HashSet` should be generalized over different hashers
|
|
--> $DIR/ice-3717.rs:7:21
|
|
|
|
|
LL | pub fn ice_3717(_: &HashSet<usize>) {
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
note: the lint level is defined here
|
|
--> $DIR/ice-3717.rs:1:9
|
|
|
|
|
LL | #![deny(clippy::implicit_hasher)]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
help: consider adding a type parameter
|
|
|
|
|
LL | pub fn ice_3717<S: ::std::hash::BuildHasher + Default>(_: &HashSet<usize, S>) {
|
|
| +++++++++++++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~~
|
|
help: ...and use generic constructor
|
|
|
|
|
LL | let _: HashSet<usize> = HashSet::default();
|
|
| ~~~~~~~~~~~~~~~~~~
|
|
|
|
error: aborting due to 1 previous error
|
|
|