mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 08:05:12 +00:00
add a test for ice-3717.rs
https://github.com/rust-lang/rust-clippy/issues/13099
This commit is contained in:
parent
5ead90f13a
commit
5e25e7c370
11
tests/ui/crashes/ice-3717.fixed
Normal file
11
tests/ui/crashes/ice-3717.fixed
Normal file
@ -0,0 +1,11 @@
|
||||
#![deny(clippy::implicit_hasher)]
|
||||
|
||||
use std::collections::HashSet;
|
||||
|
||||
fn main() {}
|
||||
|
||||
pub fn ice_3717<S: ::std::hash::BuildHasher + Default>(_: &HashSet<usize, S>) {
|
||||
//~^ ERROR: parameter of type `HashSet` should be generalized over different hashers
|
||||
let _ = [0u8; 0];
|
||||
let _: HashSet<usize> = HashSet::default();
|
||||
}
|
@ -1,7 +1,5 @@
|
||||
#![deny(clippy::implicit_hasher)]
|
||||
|
||||
//@no-rustfix: need to change the suggestion to a multipart suggestion
|
||||
|
||||
use std::collections::HashSet;
|
||||
|
||||
fn main() {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
error: parameter of type `HashSet` should be generalized over different hashers
|
||||
--> tests/ui/crashes/ice-3717.rs:9:21
|
||||
--> tests/ui/crashes/ice-3717.rs:7:21
|
||||
|
|
||||
LL | pub fn ice_3717(_: &HashSet<usize>) {
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
Loading…
Reference in New Issue
Block a user