From fcc2f92f454d9ce1e66713e28edb136d6948dd5a Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Sat, 18 May 2019 17:36:30 +0300 Subject: syntax: Return named errors from literal parsing functions --- src/test/ui/parser/no-hex-float-literal.rs | 2 +- src/test/ui/parser/no-hex-float-literal.stderr | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/test/ui/parser') diff --git a/src/test/ui/parser/no-hex-float-literal.rs b/src/test/ui/parser/no-hex-float-literal.rs index bf11dee0833..88574ba6f92 100644 --- a/src/test/ui/parser/no-hex-float-literal.rs +++ b/src/test/ui/parser/no-hex-float-literal.rs @@ -4,6 +4,6 @@ fn main() { 0x567.89; //~^ ERROR hexadecimal float literal is not supported 0xDEAD.BEEFp-2f; - //~^ ERROR invalid suffix `f` for float literal + //~^ ERROR invalid suffix `f` for integer literal //~| ERROR `{integer}` is a primitive type and therefore doesn't have fields } diff --git a/src/test/ui/parser/no-hex-float-literal.stderr b/src/test/ui/parser/no-hex-float-literal.stderr index 258ab06d5ee..48041f34838 100644 --- a/src/test/ui/parser/no-hex-float-literal.stderr +++ b/src/test/ui/parser/no-hex-float-literal.stderr @@ -4,13 +4,13 @@ error: hexadecimal float literal is not supported LL | 0x567.89; | ^^^^^^^^ -error: invalid suffix `f` for float literal +error: invalid suffix `f` for integer literal --> $DIR/no-hex-float-literal.rs:6:18 | LL | 0xDEAD.BEEFp-2f; | ^^ invalid suffix `f` | - = help: valid suffixes are `f32` and `f64` + = help: the suffix must be one of the integral types (`u32`, `isize`, etc) error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/no-hex-float-literal.rs:2:11 -- cgit 1.4.1-3-g733a5