Skip to content

Conversation

kyoto7250
Copy link
Contributor

@kyoto7250 kyoto7250 commented Aug 7, 2024

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

@rustbot
Copy link
Collaborator

rustbot commented Aug 7, 2024

r? @llogiq

rustbot has assigned @llogiq.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 7, 2024
//~^ ERROR: parameter of type `HashSet` should be generalized over different hashers
let _ = [0u8; 0];
let _: HashSet<usize> = HashSet::default();
}
Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@kyoto7250 kyoto7250 changed the title [wip] add a test for ice-3717.rs Add a test for ice-3717.rs Aug 7, 2024
@kyoto7250 kyoto7250 marked this pull request as ready for review August 7, 2024 13:25
@kyoto7250
Copy link
Contributor Author

Sorry, I had a typo for calling rustbot

r? @flip1995

@rustbot rustbot assigned flip1995 and unassigned llogiq Aug 7, 2024
Copy link
Member

@flip1995 flip1995 left a 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? 🤔

@flip1995
Copy link
Member

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented Aug 12, 2024

📌 Commit 5e25e7c has been approved by flip1995

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Aug 12, 2024

⌛ Testing commit 5e25e7c with merge a616ca7...

bors added a commit that referenced this pull request Aug 12, 2024
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`
@bors
Copy link
Contributor

bors commented Aug 12, 2024

💔 Test failed - checks-action_test

@flip1995
Copy link
Member

@bors retry

@bors
Copy link
Contributor

bors commented Aug 12, 2024

⌛ Testing commit 5e25e7c with merge 8827107...

@bors
Copy link
Contributor

bors commented Aug 12, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing 8827107 to master...

@bors bors merged commit 8827107 into rust-lang:master Aug 12, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants