|
8 | 8 |
|
9 | 9 | We unreserve:
|
10 | 10 | + `pure`
|
11 |
| -+ `unsized` |
12 | 11 | + `sizeof`
|
13 | 12 | + `alignof`
|
14 | 13 | + `offsetof`
|
@@ -37,7 +36,6 @@ used as general identifiers. This is done immediately and on edition 2015.
|
37 | 36 |
|
38 | 37 | The keywords to unreserve are:
|
39 | 38 | + `pure`
|
40 |
| -+ `unsized` |
41 | 39 | + `sizeof`
|
42 | 40 | + `alignof`
|
43 | 41 | + `offsetof`
|
@@ -132,11 +130,6 @@ other than `pure`.
|
132 | 130 | In both 1. and 2., `pure` can be contextual.
|
133 | 131 | We also don't think that the drawbacks are significant for `pure`.
|
134 | 132 |
|
135 |
| -## Rationale for `unsized` |
136 |
| - |
137 |
| -This would be a modifier on types, but we already have `<T: ?Sized>` and we |
138 |
| -could have `T: !Sized` so there seems to be no need for keeping `unsized`. |
139 |
| - |
140 | 133 | ## Rationale for `sizeof`, `alignof`, and `offsetof`
|
141 | 134 |
|
142 | 135 | We already have [`std::mem::size_of`](https://doc.rust-lang.org/nightly/std/mem/fn.size_of.html) and similar which
|
@@ -225,7 +218,18 @@ Additionally, there are known potential use cases / RFCs for:
|
225 | 218 |
|
226 | 219 | ## Possible future unreservations
|
227 | 220 |
|
228 |
| -## `priv` |
| 221 | +### `unsized` |
| 222 | + |
| 223 | +This would be a modifier on types, but we already have `<T: ?Sized>` and we |
| 224 | +could have `T: !Sized` so there seems to be no need for keeping `unsized`. |
| 225 | + |
| 226 | +However, `unsized type` or `unsized struct` might be a desirable syntax for |
| 227 | +declaring a *dynamically sized type (DST)* or completely unsized type. |
| 228 | +Therefore, we will hold of on unreserving `unsized` until we have a better |
| 229 | +ideas of how custom DSTs will work and it's clear we don't need `unsized` |
| 230 | +as a keyword. |
| 231 | + |
| 232 | +### `priv` |
229 | 233 |
|
230 | 234 | Here, `priv` is a privacy / visibility modifier on things like fields, and items.
|
231 | 235 | An example:
|
|
0 commit comments