You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The lint already exists but it needs an improvement in the way it detects temporaries :
Currently, it matches a DefId against &["core", "option", "Option", "as_ref"], while this works, this can give false negatives on temporary bindings.
The way we want that to work instead is described here : #8665 (comment)
What it does
The lint already exists but it needs an improvement in the way it detects temporaries :
Currently, it matches a DefId against
&["core", "option", "Option", "as_ref"]
, while this works, this can give false negatives on temporary bindings.The way we want that to work instead is described here : #8665 (comment)
Upstream PR introducing the initial lint : #8665
Lint Name
needless_option_take
Category
complexity
Advantage
No response
Drawbacks
No response
Example
<code>
Could be written as:
<code>
The text was updated successfully, but these errors were encountered: