Skip to content

Commit 26bd2bb

Browse files
committed
add some notes about usize/isize
1 parent ea953e9 commit 26bd2bb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

active_discussion/representation.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ To start, we will create threads for each major categories of types
107107
- What about signaling NaN etc? ([Seems like a
108108
non-issue](https://github.com/rust-lang/rust/issues/40470#issuecomment-343803381),
109109
but it'd be good to resummarize the details).
110+
- usize/isize
111+
- is `usize` the native size of a pointer? [the max of various other considerations](https://github.com/rust-rfcs/unsafe-code-guidelines/pull/5#discussion_r212702266)?
112+
what are edge cases here?
113+
- Rust currently states that the maximum size of any single value must fit in with `isize`
114+
- Can we say a bit more about why? (e.g., [ensuring that "pointer diff" is representable](https://github.com/rust-rfcs/unsafe-code-guidelines/pull/5#discussion_r212703192)
110115
- Booleans
111116
- Prior discussions ([#46156][], [#46176][]) documented bool as a single
112117
byte that is either 0 or 1.
@@ -154,7 +159,6 @@ To start, we will create threads for each major categories of types
154159
- Representation knobs:
155160
- Custom alignment ([RFC 1358])
156161
- Packed ([RFC 1240] talks about some safety issues)
157-
- ... what else?
158162

159163
We will also create categories for the following specific areas:
160164

0 commit comments

Comments
 (0)