Skip to content

Commit 2288f13

Browse files
committed
Leave validity to the table
1 parent 188a38a commit 2288f13

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/expressions/operator-expr.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -480,15 +480,12 @@ assert_eq!(values[1], 3);
480480

481481
#### Pointer-to-pointer cast
482482

483-
`*const T` / `*mut T` can be cast to `*const U` / `*mut U` under the following
484-
conditions:
483+
`*const T` / `*mut T` can be cast to `*const U` / `*mut U` with the following behavior:
485484

486-
- If both `T` and `U` are sized, the cast produces a value identical to the
487-
original pointer.
488-
- If both `T` and `U` are unsized, the cast produces a value identical to the
489-
original pointer if `T` and `U` are compatible unsized types.
490485
- If `T` is unsized and `U` is sized, the cast discards all metadata that
491486
completes the wide pointer `T` and produces a thin base pointer `U`.
487+
- Otherwise a cast from `T` to `U` produces a value identical to the original
488+
pointer.
492489

493490
## Assignment expressions
494491

0 commit comments

Comments
 (0)