Fix lines that exceed max width manually
This commit is contained in:
parent
7a06d312fd
commit
a6c71e9c0d
8 changed files with 55 additions and 22 deletions
|
@ -49,9 +49,16 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
|||
| (_, FloatWidth::F64) => "f64",
|
||||
_ => "f32"
|
||||
};
|
||||
span_help_and_lint(cx, ZERO_DIVIDED_BY_ZERO, expr.span,
|
||||
span_help_and_lint(
|
||||
cx,
|
||||
ZERO_DIVIDED_BY_ZERO,
|
||||
expr.span,
|
||||
"constant division of 0.0 with 0.0 will always result in NaN",
|
||||
&format!("Consider using `std::{}::NAN` if you would like a constant representing NaN", float_type));
|
||||
&format!(
|
||||
"Consider using `std::{}::NAN` if you would like a constant representing NaN",
|
||||
float_type,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue