Skip to content

Commit a616ca7

Browse files
committed
Auto merge of #13230 - kyoto7250:fix_issue_13099, r=flip1995
Add a test for ice-3717.rs this PR is a part of #13099. Based on the changes introduced in #13098 for introduce ui_test, we will update the uitest output. This is a fix for `ice-3717.rs`. Although fixes have already been made in #13216, it seems that he is a first-time contributor. I thought it might be better for him to refer to my PR, so I created it accordingly. Since this is my first contribution in a while, please let me know if there are any issues or required changes. changelog: None r! `@flip1995`
2 parents 1984752 + 5e25e7c commit a616ca7

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

tests/ui/crashes/ice-3717.fixed

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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+
}

tests/ui/crashes/ice-3717.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#![deny(clippy::implicit_hasher)]
22

3-
//@no-rustfix: need to change the suggestion to a multipart suggestion
4-
53
use std::collections::HashSet;
64

75
fn main() {}

tests/ui/crashes/ice-3717.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
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
33
|
44
LL | pub fn ice_3717(_: &HashSet<usize>) {
55
| ^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)