Auto merge of #5480 - sinkuu:unit_arg_app, r=flip1995

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
This commit is contained in:
bors
2020-04-17 01:40:59 +00:00
+1 -1
View File
@@ -786,7 +786,7 @@ fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr<'_>) {
"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,
);
}
}