Skip to content

Commit

Permalink
Auto merge of #5480 - sinkuu:unit_arg_app, r=flip1995
Browse files Browse the repository at this point in the history
unit_arg suggestion is not really machine-applicable

This lint suggests replacing any code returining `()`-type with `()` literal, which can change the behavior. e.g. `Ok(do_something())` -> `OK(())`.

---

changelog: none
  • Loading branch information
bors committed Apr 17, 2020
2 parents eb9c15a + 162cf26 commit 8ae143f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnitArg {
"passing a unit value to a function",
"if you intended to pass a unit value, use a unit literal instead",
"()".to_string(),
Applicability::MachineApplicable,
Applicability::MaybeIncorrect,
);
}
}
Expand Down

0 comments on commit 8ae143f

Please sign in to comment.