Skip to content

Commit ed4811d

Browse files
joshlfnikomatsakis
andauthored
Update src/expressions/operator-expr.md
Co-authored-by: Niko Matsakis <[email protected]>
1 parent 2fe40f8 commit ed4811d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/expressions/operator-expr.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,7 @@ assert_eq!(values[1], 3);
480480

481481
#### Slice DST pointer to pointer cast
482482

483-
When `T` and `U` are both "slice DSTs" - i.e., slice types or types whose trailing field
484-
is a slice type - the raw pointer types `*const T`, `*mut T`, `*const U`, and `*mut U`
483+
For slice types like `[T]` and `[U]`, the raw pointer types `*const [T]`, `*mut [T]`, `*const [U]`, and `*mut [U]`
485484
encode the number of elements in this slice. Casts between these raw pointer types
486485
preserve the number of elements. Note that, as a consequence, such casts do *not*
487486
necessarily preserve the size of the pointer's referent (e.g., casting `*const [u16]`

0 commit comments

Comments
 (0)