You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pointers to unsized types are sized. The size and alignment is guaranteed to be at least equal to the size and alignment of a pointer.
And, in a note, it says the same thing as the DST page, but says that it shouldn't be relied upon:
Note: Though you should not rely on this, all pointers to DSTs are currently twice the size of the size of usize and have the same alignment.
The two pages should be consistent. Assuming that the DST page is correct, the type layout page should also concretely say that pointers to unsized types are twice the size of regular pointers, and the note should be removed.
The text was updated successfully, but these errors were encountered:
You can have pointers to DST's that are the same size as pointers to regular types using the unstable extern { type Foo; }. In the future we might also get them larger than twice the size of regular pointers if we get custom DST's.
The 'Dynamically Sized Types' page pretty clearly states that the size of a pointer to a DST is twice the size of a regular pointer:
But, the 'Type layout' page gives this much less concrete answer:
And, in a note, it says the same thing as the DST page, but says that it shouldn't be relied upon:
The two pages should be consistent. Assuming that the DST page is correct, the type layout page should also concretely say that pointers to unsized types are twice the size of regular pointers, and the note should be removed.
The text was updated successfully, but these errors were encountered: