Skip to content

More safety comments in bevy_ecs#24488

Open
SpecificProtagonist wants to merge 6 commits into
bevyengine:mainfrom
SpecificProtagonist:more-unsafe-blocks
Open

More safety comments in bevy_ecs#24488
SpecificProtagonist wants to merge 6 commits into
bevyengine:mainfrom
SpecificProtagonist:more-unsafe-blocks

Conversation

@SpecificProtagonist
Copy link
Copy Markdown
Contributor

Objective

Part of #11590.

Solution

Remove most of the #[expect(unsafe_op_in_unsafe_fn)] in bevy_ecs and add unsafe blocks/safety comments where needed. Doesn't yet remove the exceptions from bevy_ecs::storage, bevy_ecs::query and bevy_ecs::system::system_param.

@SpecificProtagonist SpecificProtagonist added A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change D-Unsafe Touches with unsafe code in some way S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels May 29, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in ECS May 29, 2026
@hymm hymm self-requested a review May 29, 2026 20:38
@alice-i-cecile alice-i-cecile added X-Uncontroversial This work is generally agreed upon D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes labels May 31, 2026
Copy link
Copy Markdown
Contributor

@Trashtalk217 Trashtalk217 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of small nits, otherwise looks good.

Comment thread crates/bevy_ecs/src/bundle/info.rs Outdated
Comment thread crates/bevy_ecs/src/bundle/insert.rs Outdated
Comment thread crates/bevy_ecs/src/world/command_queue.rs Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes D-Unsafe Touches with unsafe code in some way S-Needs-Review Needs reviewer attention (from anyone!) to move forward X-Uncontroversial This work is generally agreed upon

Projects

Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

3 participants