Commit 8805968
authored
Fix
## Objective
Ran into this after #23896:
```sh
> cargo build -p bevy_app --no-default-features --features "std"
error: none of the predicates in this `cfg_select` evaluated to true
--> crates\bevy_app\src\panic_handler.rs:46:17
|
46 | / cfg_select! {
47 | | all(target_arch = "wasm32", feature = "web") => {
48 | | // This provides better panic handling in JS engines (displays the panic message and improves the backtrace).
49 | | std::panic::set_hook(alloc::boxed::Box::new(console_error_panic_hook::hook));
... |
58 | | }
| |_________________^
```
## Solution
Add a fallback clause. Also did a quick scan to confirm that other cases
of `cfg_select!` were fine.
## Testing
```sh
cargo build -p bevy_app --no-default-features --features "std"
cargo build -p bevy_app --no-default-features
cargo build -p bevy_app
cargo run --example 3d_scene
cargo run --example 3d_scene --target wasm32-unknown-unknown --features "webgpu"
```cfg_select! compile error in panic handler (#24030)1 parent 53b79bb commit 8805968
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
0 commit comments