Commit 06f177a
authored
Clarify rules on safety and sizeof (#1721)
* Clarify rules on safety and sizeof
This is a small focused change, but fixes what I (at least) misinterpreted at least twice.
In version 7.3 we correctly updated the rules for in 8.8 for Unmanaged types to include struct types where the fields are all unmanaged types. This includes generic types where the type parameter has the `unmanaged` constraint.
However, we didn't restate the restrictions for `sizeof` in 12.8.19 to prevent extending the allowed types in safe context to include those types.
I updated the language in 12.8.19 to make those restrictions clear.
* Respond to comments in meeting
We made a few smaller tweaks to the fix here.1 parent 8977a22 commit 06f177a
2 files changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3201 | 3201 | | |
3202 | 3202 | | |
3203 | 3203 | | |
3204 | | - | |
| 3204 | + | |
3205 | 3205 | | |
3206 | 3206 | | |
3207 | 3207 | | |
3208 | 3208 | | |
3209 | 3209 | | |
3210 | 3210 | | |
3211 | 3211 | | |
3212 | | - | |
| 3212 | + | |
3213 | 3213 | | |
3214 | 3214 | | |
3215 | 3215 | | |
| |||
3227 | 3227 | | |
3228 | 3228 | | |
3229 | 3229 | | |
3230 | | - | |
| 3230 | + | |
| 3231 | + | |
| 3232 | + | |
3231 | 3233 | | |
3232 | 3234 | | |
3233 | 3235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
668 | 668 | | |
669 | 669 | | |
670 | 670 | | |
671 | | - | |
| 671 | + | |
672 | 672 | | |
673 | 673 | | |
674 | 674 | | |
| |||
0 commit comments