Skip to content

bevy_ecs does not compile if multi_thread is enabled but std is not #21144

@hukasu

Description

@hukasu

Bevy version and features

dc14df3

What you did

I'm creating a justfile script that runs clippy on many permutations of features.

What went wrong

cargo clippy -p bevy_ecs --no-default-features --features="multi_threaded" fails with

error[E0665]: `#[derive(Default)]` on enum with no `#[default]`
  --> crates/bevy_ecs/src/schedule/executor/mod.rs:50:25
   |
50 |   #[derive(PartialEq, Eq, Default, Debug, Copy, Clone)]
   |                           ^^^^^^^
51 | / pub enum ExecutorKind {
52 | |     /// Runs the schedule using a single thread.
53 | |     ///
54 | |     /// Useful if you're dealing with a single-threaded environment, saving your threads for
...  |
68 | |     MultiThreaded,
69 | | }
   | |_- this enum needs a unit variant marked with `#[default]`
   |
help: make this unit variant default by placing `#[default]` on it
   |
57 |     #[default] SingleThreaded,
   |     ++++++++++
help: make this unit variant default by placing `#[default]` on it
   |
64 |     #[default] Simple,
   |     ++++++++++

For more information about this error, try `rustc --explain E0665`.
error: could not compile `bevy_ecs` (lib) due to 1 previous error
error: Recipe `bevy_ecs` failed on line 16 with exit code 101

Metadata

Metadata

Assignees

Labels

C-BugAn unexpected or incorrect behaviorP-Compile-FailureA failure to compile Bevy appsS-Needs-DesignThis issue requires design work to think about how it would best be accomplished

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions