File tree 3 files changed +12
-3
lines changed
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 1
1
#![ deny( clippy:: implicit_hasher) ]
2
2
3
- //@no-rustfix: need to change the suggestion to a multipart suggestion
4
-
5
3
use std:: collections:: HashSet ;
6
4
7
5
fn main ( ) { }
Original file line number Diff line number Diff line change 1
1
error: 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
3
3
|
4
4
LL | pub fn ice_3717(_: &HashSet<usize>) {
5
5
| ^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments