1
Fork 0

Use LitKind::Err for floats with unsupported bases.

This slightly changes error messages in `float-field.rs`, but nothing of
real importance.
This commit is contained in:
Nicholas Nethercote 2024-02-28 16:30:20 +11:00
parent 79766098a4
commit 840c8d3243
3 changed files with 77 additions and 67 deletions

View file

@ -515,7 +515,9 @@ impl<'sess, 'src> StringReader<'sess, 'src> {
};
if let Some(base) = base {
let span = self.mk_sp(start, end);
self.dcx().emit_err(errors::FloatLiteralUnsupportedBase { span, base });
let guar =
self.dcx().emit_err(errors::FloatLiteralUnsupportedBase { span, base });
kind = token::Err(guar)
}
(kind, self.symbol_from_to(start, end))
}