bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Doc trivial ecs unsafe

Open hymm opened this issue 1 week ago • 0 comments

Objective

  • Trying to doc most of the unsafe in the ecs crate so we can turn on unsafe_op_in_unsafe_fn.

Solution

  • Unfortunately reviewing the unsafe docs will probably not be trivial if we try to do it all in one pr. There are 400+ warnings when you turn on the lint. So we need to break it up as much as possible as reviewing the safety contracts in some cases isn't the easiest.
  • This pr includes two types of unsafe blocks.
    1. Blocks that already had safety comments, but were missing the unsafe {} block.
    2. Unsafe functions that have the same safety contract as their unsafe parent function and are very short. (Usually just the call to the function).

hymm avatar Dec 02 '25 23:12 hymm