Skip to content

Commit 2aaac93

Browse files
authored
Fix bevy_ecs doc tests with --all-features (#18424)
## Objective Fix `bevy_ecs` doc tests failing when used with `--all-features`. ``` ---- crates\bevy_ecs\src\error\handler.rs - error::handler::GLOBAL_ERROR_HANDLER (line 87) stdout ---- error[E0425]: cannot find function `default_error_handler` in this scope --> crates\bevy_ecs\src\error\handler.rs:92:24 | 8 | let error_handler = default_error_handler(); | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope ``` I happened to come across this while testing #12207. I'm not sure it actually needs fixing but seemed worth a go ## Testing ``` cargo test --doc -p bevy_ecs --all-features ``` ## Side Notes The CI misses this error as it doesn't use `--all-features`. Perhaps it should? I tried adding `--all-features` to `ci/src/commands/doc_tests.rs` but this triggered a linker error: ``` Compiling bevy_dylib v0.16.0-dev (C:\Projects\bevy\crates\bevy_dylib) error: linking with `link.exe` failed: exit code: 1189 = note: LINK : fatal error LNK1189: library limit of 65535 objects exceeded␍ ```
1 parent faef6d1 commit 2aaac93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_ecs/src/error/handler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ impl ErrorContext {
8585
/// To use this error handler in your app for custom error handling logic:
8686
///
8787
/// ```rust
88-
/// use bevy_ecs::error::{GLOBAL_ERROR_HANDLER, BevyError, ErrorContext, panic};
88+
/// use bevy_ecs::error::{default_error_handler, GLOBAL_ERROR_HANDLER, BevyError, ErrorContext, panic};
8989
///
9090
/// fn handle_errors(error: BevyError, ctx: ErrorContext) {
9191
/// let error_handler = default_error_handler();

0 commit comments

Comments
 (0)