File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -366,6 +366,7 @@ See [literal expressions] for the effect of these suffixes.
366366Examples of integer literals of various forms:
367367
368368``` rust
369+ # #![allow(overflowing_literals)]
369370123 ;
370371123i32 ;
371372123u32 ;
@@ -382,6 +383,12 @@ Examples of integer literals of various forms:
3823830b________1 ;
383384
3843850usize ;
386+
387+ // These are too big for their type, but are still valid tokens
388+
389+ 128_i8 ;
390+ 256_u8 ;
391+
385392```
386393
387394Note that ` -1i8 ` , for example, is analyzed as two tokens: ` - ` followed by ` 1i8 ` .
@@ -399,11 +406,6 @@ Examples of invalid integer literals:
3994060b0102;
4004070o0581;
401408
402- // integers too big for their type (they overflow)
403-
404- 128_i8;
405- 256_u8;
406-
407409// bin, hex, and octal literals must have at least one digit
408410
4094110b_;
You can’t perform that action at this time.
0 commit comments