"Use instead" example for as_ptr_cast_mut
has undefined behavior
#10628
Labels
A-documentation
Area: Adding or improving documentation
Description
The documentation for the
as_ptr_cast_mut
lint suggests the following as an example of correct code:However, running this code in Miri on the playground gives the following error, indicating undefined behavior:
Version
No response
Additional Labels
@rustbot label +A-documentation
The text was updated successfully, but these errors were encountered: