1
Fork 0

Rollup merge of #78431 - Rustin-Liu:rustin-patch-lint, r=estebank

Prefer new associated numeric consts in float error messages

Fix https://github.com/rust-lang/rust/issues/78382
This commit is contained in:
Jonas Schievink 2020-10-29 17:05:21 +01:00 committed by GitHub
commit 31cfe63fb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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)