diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-28 16:30:20 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-28 20:59:32 +1100 |
| commit | 840c8d3243761ac7d3976239aeba6f866f9df1eb (patch) | |
| tree | 3d3fde2de7464721a26d5b2c9c7fbfefdbee64a5 /tests/ui/parser/float-field.rs | |
| parent | 79766098a469c72a24464e8157f58b3c6272f3d2 (diff) | |
| download | rust-840c8d3243761ac7d3976239aeba6f866f9df1eb.tar.gz rust-840c8d3243761ac7d3976239aeba6f866f9df1eb.zip | |
Use `LitKind::Err` for floats with unsupported bases.
This slightly changes error messages in `float-field.rs`, but nothing of real importance.
Diffstat (limited to 'tests/ui/parser/float-field.rs')
| -rw-r--r-- | tests/ui/parser/float-field.rs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/ui/parser/float-field.rs b/tests/ui/parser/float-field.rs index e074b0567a3..59fefee26aa 100644 --- a/tests/ui/parser/float-field.rs +++ b/tests/ui/parser/float-field.rs @@ -33,15 +33,17 @@ fn main() { { s.0x1e1; } //~ ERROR no field `0x1e1` on type `S` - { s.0x1.; } //~ ERROR no field `0x1` on type `S` - //~| ERROR hexadecimal float literal is not supported - //~| ERROR unexpected token: `;` + { s.0x1.; } //~ ERROR hexadecimal float literal is not supported + //~| ERROR unexpected token: `0x1.` + //~| ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `0x1.` - { s.0x1.1; } //~ ERROR no field `0x1` on type `S` - //~| ERROR hexadecimal float literal is not supported + { s.0x1.1; } //~ ERROR hexadecimal float literal is not supported + //~| ERROR unexpected token: `0x1.1` + //~| expected one of `.`, `;`, `?`, `}`, or an operator, found `0x1.1` - { s.0x1.1e1; } //~ ERROR no field `0x1` on type `S` - //~| ERROR hexadecimal float literal is not supported + { s.0x1.1e1; } //~ ERROR hexadecimal float literal is not supported + //~| ERROR unexpected token: `0x1.1e1` + //~| expected one of `.`, `;`, `?`, `}`, or an operator, found `0x1.1e1` { s.0x1e+; } //~ ERROR expected expression, found `;` |
