Skip to content

Commit

Permalink
Merge pull request #73 from janosh/fix-casing-types-bit-width
Browse files Browse the repository at this point in the history
Fix casing in type bit widths
  • Loading branch information
mgeisler authored Dec 27, 2022
2 parents bc37d48 + cf695a9 commit d052db8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/basic-syntax/scalar-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
| Floating point numbers | `f32`, `f64` | `3.14`, `-10.0e20`, `2f32` |
| Strings | `&str` | `"foo"`, `r#"\\"#` |
| Unicode scalar values | `char` | `'a'`, `'α'`, `'∞'` |
| Byte strings | `&[u8]` | `b"abc"`, `br#" " "#` |
| Byte strings | `&[u8]` | `b"abc"`, `br#" " "#` |
| Booleans | `bool` | `true`, `false` |

The types have widths as follows:

* `iN`, `uN`, and `fN` are _n_ bits wide,
* `iN`, `uN`, and `fN` are _N_ bits wide,
* `isize` and `usize` are the width of a pointer,
* `char` is 32 bit wide,
* `bool` is 8 bit wide.

0 comments on commit d052db8

Please sign in to comment.