Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clippy (nightly): this implementation is unsound, as some fields in World are !Send #3454

Closed
HackerFoo opened this issue Dec 28, 2021 · 1 comment
Labels
A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change

Comments

@HackerFoo
Copy link
Contributor

Bevy version

main @ 3a9d5a6

Operating system & version

MacOS 12.1

What you did

cargo clippy --workspace --all-targets --all-features -- -D warnings -A clippy::type_complexity

What you expected to happen

No warnings.

What actually happened

    Checking bevy_ecs v0.5.0 (/Users/dusty/src/noumenal/crates/bevy/crates/bevy_ecs)
error: this implementation is unsound, as some fields in `World` are `!Send`
    --> crates/bevy_ecs/src/world/mod.rs:1162:1
     |
1162 | unsafe impl Send for World {}
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: `-D clippy::non-send-fields-in-send-ty` implied by `-D warnings`
note: the type of field `archetypes` is `!Send`
    --> crates/bevy_ecs/src/world/mod.rs:75:5
     |
75   |     pub(crate) archetypes: Archetypes,
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     = help: use a thread-safe type that implements `Send`
note: the type of field `storages` is `!Send`
    --> crates/bevy_ecs/src/world/mod.rs:76:5
     |
76   |     pub(crate) storages: Storages,
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     = help: use a thread-safe type that implements `Send`
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_send_fields_in_send_ty

error: could not compile `bevy_ecs` due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed

Additional information

cargo clippy --version
clippy 0.1.58 (efec5452 2021-12-04)
@HackerFoo HackerFoo added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Dec 28, 2021
@mockersf mockersf added A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change and removed S-Needs-Triage This issue needs to be labelled C-Bug An unexpected or incorrect behavior labels Dec 29, 2021
@james7132
Copy link
Member

Closing this as #3666 covers the same issue, but already has several points linked to it.

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
Projects
None yet
Development

No branches or pull requests

3 participants