needless_borrow should trigger when taking a reference to Option<&_> #11326
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-negative
Issue: The lint should have been triggered on code, but wasn't
Uh oh!
There was an error while loading. Please reload this page.
Lint Name
needless_borrow
Reproducer
I tried this code:
I expected to see this happen:
needless_borrow
triggering for&o.str_getter()
Instead, this happened: nothing
Version
Tested on Rust playground, hence less info. Let me know if you need me to reproduce locally.
The text was updated successfully, but these errors were encountered: