Add an Option<Span> argument to span_lint_and_help.
This commit is contained in:
@@ -49,6 +49,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ZeroDiv {
|
||||
ZERO_DIVIDED_BY_ZERO,
|
||||
expr.span,
|
||||
"constant division of `0.0` with `0.0` will always result in NaN",
|
||||
None,
|
||||
&format!(
|
||||
"Consider using `{}::NAN` if you would like a constant representing NaN",
|
||||
float_type,
|
||||
|
||||
Reference in New Issue
Block a user