Skip to content

Commit

Permalink
Rollup merge of rust-lang#32906 - jocki84:jocki84-book-size, r=stevek…
Browse files Browse the repository at this point in the history
…labnik

Reword explanation of 'size' types.

Do not reference machine 'pointers' in explanation of 'size' types.

I think the number of elements that can be directly addressed is a fundamental feature of a machine architecture in its own right. The fact that it coincides with the ‘size’ of a pointer should be viewed as an ‘implementation detail’ ;)
  • Loading branch information
steveklabnik committed Apr 18, 2016
2 parents 5d0dca3 + a548d4d commit 108a9e4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/doc/book/primitive-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ and `i64` is a signed, 64-bit integer.

## Variable-size types

Rust also provides types whose size depends on the size of a pointer of the
underlying machine. These types have ‘size’ as the category, and come in signed
and unsigned varieties. This makes for two types: `isize` and `usize`.
Rust also provides types whose particular size depends on the underlying machine
architecture. Their range is sufficient to express the size of any collection, so
these types have ‘size’ as the category. They come in signed and unsigned varieties
which account for two types: `isize` and `usize`.

## Floating-point types

Expand Down

0 comments on commit 108a9e4

Please sign in to comment.