summary refs log tree commit diff
path: root/src/test/ui/parser
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-05-18 17:36:30 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-05-23 12:44:05 +0300
commitfcc2f92f454d9ce1e66713e28edb136d6948dd5a (patch)
tree1a5893ca61d737492851dfba7d3831949333071e /src/test/ui/parser
parent85334c50921a1c90707c9d0fb344c63bd373e1b8 (diff)
downloadrust-fcc2f92f454d9ce1e66713e28edb136d6948dd5a.tar.gz
rust-fcc2f92f454d9ce1e66713e28edb136d6948dd5a.zip
syntax: Return named errors from literal parsing functions
Diffstat (limited to 'src/test/ui/parser')
-rw-r--r--src/test/ui/parser/no-hex-float-literal.rs2
-rw-r--r--src/test/ui/parser/no-hex-float-literal.stderr4
2 files changed, 3 insertions, 3 deletions
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