-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
False postive for if-let-rescope on hashbrown::HashMap::get? #137411
Copy link
Copy link
Closed
Labels
A-edition-2024Area: The 2024 editionArea: The 2024 editionA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.I-edition-triagedIssue: This issue has been reviewed and triaged by the Edition team.Issue: This issue has been reviewed and triaged by the Edition team.L-false-positiveLint: False positive (should not have fired).Lint: False positive (should not have fired).L-if_let_rescopeLint: if_let_rescopeLint: if_let_rescopeT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-edition-2024Area: The 2024 editionArea: The 2024 editionA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.I-edition-triagedIssue: This issue has been reviewed and triaged by the Edition team.Issue: This issue has been reviewed and triaged by the Edition team.L-false-positiveLint: False positive (should not have fired).Lint: False positive (should not have fired).L-if_let_rescopeLint: if_let_rescopeLint: if_let_rescopeT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
hashbrown::HashMap::getreturns a reference which has no significant drop.I've see this on other methods like
hashbrown::HashMap::get_mut, the equivalent methods onstd::collections::HashMapdon't seem to have this false positive.Code
Code in the playground.
Current output