-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
new clippy lint: unsound Send implementations #3666
Copy link
Copy link
Closed
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsA-UIGraphical user interfaces, styles, layouts, and widgetsGraphical user interfaces, styles, layouts, and widgetsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behavior
Description
Bevy version
What you did
Running clippy with rust 1.58
What you expected to happen
No issues
What actually happened
Two failures:
error: this implementation is unsound, as some fields in `World` are `!Send`
--> crates/bevy_ecs/src/world/mod.rs:1163:1
|
1163 | 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
error: this implementation is unsound, as some fields in `FlexSurface` are `!Send`
--> crates/bevy_ui/src/flex/mod.rs:26:1
|
26 | unsafe impl Send for FlexSurface {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::non-send-fields-in-send-ty` implied by `-D warnings`
note: the type of field `stretch` is `!Send`
--> crates/bevy_ui/src/flex/mod.rs:21:5
|
21 | stretch: Stretch,
| ^^^^^^^^^^^^^^^^
= 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_ui` due to previous error
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsA-UIGraphical user interfaces, styles, layouts, and widgetsGraphical user interfaces, styles, layouts, and widgetsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behavior