Skip to content

Commit

Permalink
Try to specify what the base pointer is
Browse files Browse the repository at this point in the history
  • Loading branch information
udoprog committed Jan 24, 2024
1 parent 2288f13 commit 4b80115
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/expressions/operator-expr.md
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,8 @@ assert_eq!(values[1], 3);
`*const T` / `*mut T` can be cast to `*const U` / `*mut U` with the following behavior:

- If `T` is unsized and `U` is sized, the cast discards all metadata that
completes the wide pointer `T` and produces a thin base pointer `U`.
completes the wide pointer `T` and produces a thin pointer `U` to the
value of the unsized pointer.
- Otherwise a cast from `T` to `U` produces a value identical to the original
pointer.

Expand Down

0 comments on commit 4b80115

Please sign in to comment.