-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesL-suggestionLint: Improving, adding or fixing lint suggestionsLint: Improving, adding or fixing lint suggestions
Description
The help message reported by the indexing_slicing
lint could be improved to be more specific. Currently its reports are relatively generic suggestions, i.e. slicing may panic. Consider using .get(..n) or .get_mut(..n) instead
.
It would be useful if we figured out whether get()
or get_mut()
were the right function to suggest and reported the index/span's actual value. After these changes the above example might look something like slicing may panic. Consider using .get_mut(..3) instead
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesL-suggestionLint: Improving, adding or fixing lint suggestionsLint: Improving, adding or fixing lint suggestions