Skip to content

make ignored internally mutable types for mutable-key configurable #9692

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

Merged
merged 1 commit into from
Oct 25, 2022

Conversation

llogiq
Copy link
Contributor

@llogiq llogiq commented Oct 22, 2022

We had some false positives where people would create their own types that had interior mutability unrelated to hash/eq. This addition lets you configure this as e.g. arc-like-types=["bytes::Bytes"]

This fixes #5325 by allowing users to specify the types whose innards like Arc should be ignored (the generic types are still checked) for the sake of detecting inner mutability.

r? @Alexendoo


changelog: Allow configuring types to ignore internal mutability in mutable-key

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Oct 22, 2022
@llogiq llogiq force-pushed the mutable-key-more-arcs branch from 1bd11c1 to 6c89098 Compare October 23, 2022 19:31
@llogiq
Copy link
Contributor Author

llogiq commented Oct 23, 2022

Thanks @Alexendoo for the review. I incorporated your suggestions.

@llogiq llogiq force-pushed the mutable-key-more-arcs branch from 6c89098 to d06539f Compare October 23, 2022 20:07
@llogiq llogiq force-pushed the mutable-key-more-arcs branch 2 times, most recently from 4939139 to e5ebb02 Compare October 24, 2022 21:04
@llogiq llogiq force-pushed the mutable-key-more-arcs branch from e5ebb02 to ab02459 Compare October 24, 2022 22:57
We had some false positives where people would create their own types
that had interior mutability unrelated to hash/eq. This addition lets
you configure this as e.g. `arc-like-types=["bytes::Bytes"]`
@llogiq llogiq force-pushed the mutable-key-more-arcs branch from ab02459 to eba36e6 Compare October 24, 2022 23:51
@llogiq llogiq changed the title make arc-likes for mutable-key configurable make ignored internally mutable types for mutable-key configurable Oct 25, 2022
@Alexendoo
Copy link
Member

Nice, thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Oct 25, 2022

📌 Commit eba36e6 has been approved by Alexendoo

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Oct 25, 2022

⌛ Testing commit eba36e6 with merge 9a42501...

@bors
Copy link
Contributor

bors commented Oct 25, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Alexendoo
Pushing 9a42501 to master...

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.

mutable_key_type false positives
4 participants