-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a test for ice-3717.rs #13230
Add a test for ice-3717.rs #13230
Conversation
//~^ ERROR: parameter of type `HashSet` should be generalized over different hashers | ||
let _ = [0u8; 0]; | ||
let _: HashSet<usize> = HashSet::default(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I run the test in local, the same file is output as when it was deleted.
I need to investigate this a bit more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I run the test in 22eeb11, and I found the ice-3717.1.fixed
and ice-3717.2.fixed
.
ice-3717.1.fixed
#![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::new();
}
ice-3717.2.fixed
#![deny(clippy::implicit_hasher)]
use std::collections::HashSet;
fn main() {}
pub fn ice_3717(_: &HashSet<usize>) {
//~^ ERROR: parameter of type `HashSet` should be generalized over different hashers
let _ = [0u8; 0];
let _: HashSet<usize> = HashSet::default();
}
However, running it on the current master branch will only generate one test.
Sorry, I had a typo for calling rustbot r? @flip1995 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EDIT:
However, running it on the current master branch will only generate one test.
Nvm, I missed the last sentence.
I don't think this is correct. This lint should only produce one fixed
file with both locations changed. 2 files should only be emitted, if 2 different suggestions are produced for the same span.
This produces one suggestion for 2 different spans. Maybe the wrong function is used when producing the suggestion? 🤔
@bors r+ Thanks! |
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`
💔 Test failed - checks-action_test |
@bors retry |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
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