1
Fork 0

Reword message for incorrect float literal

This commit is contained in:
Esteban Küber 2019-01-20 13:59:35 -08:00
parent acbda76f23
commit e387597a8f
3 changed files with 5 additions and 5 deletions

View file

@ -2002,10 +2002,10 @@ impl<'a> Parser<'a> {
self.bump();
let sp = lo.to(self.prev_span);
let mut err = self.diagnostic()
.struct_span_err(sp, "numeric float literals must have a significant");
.struct_span_err(sp, "float literals must have an integer part");
err.span_suggestion_with_applicability(
sp,
"numeric float literals must have a significant",
"must have an integer part",
format!("0.{}", val),
Applicability::MachineApplicable,
);