Skip to content

Commit 108a9e4

Browse files
committed
Rollup merge of rust-lang#32906 - jocki84:jocki84-book-size, r=steveklabnik
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’ ;)
2 parents 5d0dca3 + a548d4d commit 108a9e4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/doc/book/primitive-types.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,10 @@ and `i64` is a signed, 64-bit integer.
9797

9898
## Variable-size types
9999

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

104105
## Floating-point types
105106

0 commit comments

Comments
 (0)