Irritating "unused" warning #108885
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
D-terse
Diagnostics: An error or lint that doesn't give enough information about the problem at hand.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
No warning when nothing is done to an iterator or similar when they are returned from a function with side effects.
If a warning is shown, it should be like this:
Rationale and extra context
rustc finds that remove returns an iterator.
Obviously I am not doing anything with it.
But the of the line is not to do something with the iterator, but to remove it from the list.
Other cases
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: