indexing_slicing warns about using custom indexing operations #11525
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
indexing_slicing
warns about use of custom indexing operators that cannot possibly fail. I think it may make sense to check whether an indexed type hasget
method, and not report a problem if it doesn't.This was initially reported to me on https://codeberg.org/xfix/enum-map/issues/78.
Lint Name
indexing_slicing
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
No warning.
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: