There is a missing safety comment in bevy_render
#9393
Labels
A-Rendering
Drawing game state to the screen
A-Windowing
Platform-agnostic interface layer to run your app in
C-Docs
An addition or correction to our documentation
P-Unsound
A bug that results in undefined compiler behavior
How can Bevy's documentation be improved?
bevy_render::view::window
has a fairly largeunsafe
block with no safety comment.bevy/crates/bevy_render/src/view/window.rs
Lines 240 to 242 in 9e8de2a
The unsafe operation is
render_instance.create_surface(…)
(https://docs.rs/wgpu/latest/wgpu/struct.Instance.html#method.create_surface).unsafe
block could be limited tocreate_surface
, the rest of theunsafe
block doesn't uphold any invariants related tocreate_surface
RawWindowHandle
passed tocreate_surface
are valid. (to be fair, this seems particularly tricky, since I don't see any definition of "valid" in the wgpu doc)The text was updated successfully, but these errors were encountered: