Skip to content

Commit 2bddc3c

Browse files
committed
rfc, unreservations: clarify offsetof wrt. const fn & macro.
1 parent 47408ea commit 2bddc3c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

text/0000-unreservations-2018.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ could have `T: !Sized` so there seems to be no need for keeping `unsized`.
140140
## Rationale for `sizeof`, `alignof`, and `offsetof`
141141

142142
We already have [`std::mem::size_of`](https://doc.rust-lang.org/nightly/std/mem/fn.size_of.html) and similar which
143-
are `const fn`s or can be.
143+
are `const fn`s or can be. In the case of `offsetof`, we would instead use
144+
a macro `offet_of!`.
144145

145146
A reason why we might want to keep these reserved is that they already exist in
146147
the standard library, and so we might not want anyone to define these functions,

0 commit comments

Comments
 (0)