Skip to content

Commit

Permalink
Auto merge of rust-lang#79329 - camelid:int-lit-suffix-error, r=david…
Browse files Browse the repository at this point in the history
…twco

Update error to reflect that integer literals can have float suffixes

For example, `1` is parsed as an integer literal, but it can be turned
into a float with the suffix `f32`. Now the error calls them "numeric
literals" and notes that you can add a float suffix since they can be
either integers or floats.
  • Loading branch information
bors committed Nov 30, 2020
2 parents d55d791 + 2347eac commit 3be53bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/ui/crashes/ice-3891.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
error: invalid suffix `x` for integer literal
error: invalid suffix `x` for number literal
--> $DIR/ice-3891.rs:2:5
|
LL | 1x;
| ^^ invalid suffix `x`
|
= help: the suffix must be one of the integral types (`u32`, `isize`, etc)
= help: the suffix must be one of the numeric types (`u32`, `isize`, `f32`, etc.)

error: aborting due to previous error

0 comments on commit 3be53bc

Please sign in to comment.