Prefer new associated numeric consts in float error messages

This commit is contained in:
Rustin-Liu 2020-10-27 14:14:08 +08:00
parent 28f03ac4c0
commit 650e3cb176
2 changed files with 5 additions and 5 deletions

View file

@ -439,7 +439,7 @@ fn lint_literal<'tcx>(
cx.struct_span_lint(OVERFLOWING_LITERALS, e.span, |lint| {
lint.build(&format!("literal out of range for `{}`", t.name_str()))
.note(&format!(
"the literal `{}` does not fit into the type `{}` and will be converted to `std::{}::INFINITY`",
"the literal `{}` does not fit into the type `{}` and will be converted to `{}::INFINITY`",
cx.sess()
.source_map()
.span_to_snippet(lit.span)