Skip to content

Commit

Permalink
Update src/design_notes/dynsized_constraints.md
Browse files Browse the repository at this point in the history
Co-authored-by: Christopher Durham <cad97@cad97.com>
  • Loading branch information
nikomatsakis and CAD97 authored Oct 11, 2022
1 parent 1aa06cc commit 9e68194
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/design_notes/dynsized_constraints.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ In addition, `Weak` are pointers to the *reference count* part of the `ArcInner`
and thus need to *statically* know the alignment of the pointee type to determine the offset
(it cannot call `align_of_val_raw` without first knowing the offset).

There are three potential resolutions that handle both size and alignment uniformly:
There are four potential resolutions that handle both size and alignment uniformly:

- Store layout information in the `ArcInner` header, or
- Store layout information in `T`'s space after it's been dropped, or
- Require that layout be determined solely from pointee metadata, or
- Require that layout be determinable from a dropped pointee.[^why]

Expand Down

0 comments on commit 9e68194

Please sign in to comment.