Skip to content

Commit 8ae143f

Browse files
committed
Auto merge of rust-lang#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
2 parents eb9c15a + 162cf26 commit 8ae143f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnitArg {
786786
"passing a unit value to a function",
787787
"if you intended to pass a unit value, use a unit literal instead",
788788
"()".to_string(),
789-
Applicability::MachineApplicable,
789+
Applicability::MaybeIncorrect,
790790
);
791791
}
792792
}

0 commit comments

Comments
 (0)