forked from rust-lang/rust
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#10142 - EricWu2003:drop_ref-FP, r=llogiq
[`drop_ref`]: don't lint idiomatic in match arm fixes rust-lang#10122 As established in issue rust-lang#9482, it is idiomatic to use a single `drop()` expression in a match arm to achieve a side-effect of a function while discarding its output. This should also apply to cases where the function returns a reference. The change to the lint's code was less than 1 line, because all the heavy lifting was done in PR rust-lang#9491. --- changelog: FP: [`drop_ref`]: No longer lints idiomatic expression in `match` arms [rust-lang#10142](rust-lang/rust-clippy#10142) <!-- changelog_checked -->
- Loading branch information
Showing
3 changed files
with
61 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters