unwrap_used not triggered when chained from get() or get_mut() #8124
Labels
C-bug
Category: Clippy is not doing the correct thing
good-first-issue
These issues are a good way to get started with Clippy
I-false-negative
Issue: The lint should have been triggered on code, but wasn't
Summary
it appears that the
unwrap_used
lint does not trigger for code of the formfoo.get(i).unwrap()
orfoo.get_mut(i).unwrap()
Lint Name
unwrap_used
Reproducer
I tried this code:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=2ed9ce35f88fd2d4c16151aeed566134
I expected to see this happen:
all three functions should trigger the
unwrap_used
lintInstead, this happened:
the second function does not trigger the lint
Version
The text was updated successfully, but these errors were encountered: