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
Copy file name to clipboardExpand all lines: src/type-layout.md
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -89,7 +89,7 @@ Pointers to unsized types are sized. The size and alignment is guaranteed to be
89
89
at least equal to the size and alignment of a pointer.
90
90
91
91
> [!NOTE]
92
-
> Though you should not rely on this, all pointers to <abbrtitle="Dynamically Sized Types">DSTs</abbr> are currently twice the size of the size of `usize` and have the same alignment.
92
+
> Though you should not rely on this, all pointers to <abbrtitle="Dynamically Sized Types">DSTs</abbr> have the same alignment as usize.
93
93
94
94
r[layout.array]
95
95
## Array Layout
@@ -110,6 +110,7 @@ r[layout.str]
110
110
## `str` Layout
111
111
112
112
String slices are a UTF-8 representation of characters that have the same layout as slices of type `[u8]`.
113
+
A reference `&str` has the same layout as a reference `&[u8]`.
0 commit comments