Skip to content

Commit

Permalink
Merge pull request rust-lang#699 from lzutao/fix-layout-table
Browse files Browse the repository at this point in the history
Fix layout table rendering
  • Loading branch information
Centril authored Oct 20, 2019
2 parents 0757a2d + 628dea4 commit 1a0d0d5
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/type-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,22 @@ alignment of the type respectively.

The size of most primitives is given in this table.

Type | `size_of::<Type>()`
- | - | -
bool | 1
u8 | 1
u16 | 2
u32 | 4
u64 | 8
u128 | 16
i8 | 1
i16 | 2
i32 | 4
i64 | 8
i128 | 16
f32 | 4
f64 | 8
char | 4
|Type | `size_of::<Type>()`|
|-- |-- |
|bool | 1 |
|u8 | 1 |
|u16 | 2 |
|u32 | 4 |
|u64 | 8 |
|u128 | 16 |
|i8 | 1 |
|i16 | 2 |
|i32 | 4 |
|i64 | 8 |
|i128 | 16 |
|f32 | 4 |
|f64 | 8 |
|char | 4 |

`usize` and `isize` have a size big enough to contain every address on the
target platform. For example, on a 32 bit target, this is 4 bytes and on a 64
Expand Down

0 comments on commit 1a0d0d5

Please sign in to comment.