File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -480,15 +480,12 @@ assert_eq!(values[1], 3);
480
480
481
481
#### Pointer-to-pointer cast
482
482
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:
485
484
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.
490
485
- If ` T ` is unsized and ` U ` is sized, the cast discards all metadata that
491
486
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.
492
489
493
490
## Assignment expressions
494
491
You can’t perform that action at this time.
0 commit comments