Repository navigation
Closed
rust-lang/rust
#161552Labels
C-BugAn unexpected or incorrect behaviorI-Compile-FailureA failure to compile Bevy appsS-BlockedThis cannot move forward until something else changesS-Needs-InvestigationThis issue requires detective work to figure out what's going wrong
Description
Workaround
tl;dr: Fixed since rustc nightly 2026-08-24.
old tl;dr: Use RUSTFLAGS=-Znext-solver=coherence or equivalent cargo config when compiling with rustc 1.100.0-nightly (c656540d6 2026-08-21) or newer.
Bevy version and features
- Bevy version: 0.19.1
- Enabled bevy features: I don't think these are relevant, because the bug has been confirmed in Discord by other ppl as well. So if it's only caused by certain features, they are probably very common ones.
Relevant system information
❯ cargo --version && rustc --version
cargo 1.100.0-nightly (514c56dd7 2026-08-19)
rustc 1.100.0-nightly (c656540d6 2026-08-21)
❯ uname -a
Linux nixos-work 6.18.44 #1-NixOS SMP PREEMPT_DYNAMIC Sun Aug 9 18:25:30 UTC 2026 x86_64 GNU/Linux
What you did
Built a project that has a bevy 0.19.1 dependency using cargo build.
What went wrong
Compilation fails with:
error[E0034]: multiple applicable items in scope
--> /home/felix/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bevy_render-0.19.1/src/render_phase/mod.rs:1532:30
|
1532 | ... .run_if(resource_exists::<BatchedInstanceBuffer<GFBD::BufferData...
| ^^^^^^ multiple `run_if` found
|
= note: candidate #1 is defined in an impl of the trait `bevy_ecs::schedule::IntoScheduleConfigs` for the type `F`
= note: candidate #2 is defined in an impl of the trait `bevy_ecs::observer::ObserverSystemExt` for the type `T`
help: disambiguate the method for candidate #1
|
1531 - no_gpu_preprocessing::batch_and_prepare_binned_render_phase::<BPI, GFBD>
1532 - .run_if(resource_exists::<BatchedInstanceBuffer<GFBD::BufferData>>),
1531 + bevy_ecs::schedule::IntoScheduleConfigs::run_if(no_gpu_preprocessing::batch_and_prepare_binned_render_phase::<BPI, GFBD>, resource_exists::<BatchedInstanceBuffer<GFBD::BufferData>>),
|
help: disambiguate the method for candidate #2
|
1531 - no_gpu_preprocessing::batch_and_prepare_binned_render_phase::<BPI, GFBD>
1532 - .run_if(resource_exists::<BatchedInstanceBuffer<GFBD::BufferData>>),
1531 + bevy_ecs::observer::ObserverSystemExt::run_if(no_gpu_preprocessing::batch_and_prepare_binned_render_phase::<BPI, GFBD>, resource_exists::<BatchedInstanceBuffer<GFBD::BufferData>>),
|
Building [=======================> ] 541/563: bevy_light, bevy_picking, b…
error[E0034]: multiple applicable items in scope
--> /home/felix/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bevy_render-0.19.1/src/render_phase/mod.rs:1534:30
|
1534 | ... .run_if(
| ^^^^^^ multiple `run_if` found
|
= note: candidate #1 is defined in an impl of the trait `bevy_ecs::schedule::IntoScheduleConfigs` for the type `F`
= note: candidate #2 is defined in an impl of the trait `bevy_ecs::observer::ObserverSystemExt` for the type `T`
help: disambiguate the method for candidate #1
|
1533 ~ bevy_ecs::schedule::IntoScheduleConfigs::run_if(gpu_preprocessing::batch_and_prepare_binned_render_phase::<BPI, GFBD>, resource_exists::<
1534 + BatchedInstanceBuffers<GFBD::BufferData, GFBD::BufferInputData>,
1535 ~ >),
|
help: disambiguate the method for candidate #2
|
1533 ~ bevy_ecs::observer::ObserverSystemExt::run_if(gpu_preprocessing::batch_and_prepare_binned_render_phase::<BPI, GFBD>, resource_exists::<
1534 + BatchedInstanceBuffers<GFBD::BufferData, GFBD::BufferInputData>,
1535 ~ >),
|
Building [=======================> ] 541/563: bevy_light, bevy_picking, b…
error[E0034]: multiple applicable items in scope
--> /home/felix/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bevy_render-0.19.1/src/render_phase/mod.rs:1543:26
|
1543 | .run_if(
| ^^^^^^ multiple `run_if` found
|
= note: candidate #1 is defined in an impl of the trait `bevy_ecs::schedule::IntoScheduleConfigs` for the type `F`
= note: candidate #2 is defined in an impl of the trait `bevy_ecs::observer::ObserverSystemExt` for the type `T`
help: disambiguate the method for candidate #1
|
1542 ~ bevy_ecs::schedule::IntoScheduleConfigs::run_if(gpu_preprocessing::write_binned_instance_buffers::<BPI, GFBD>, resource_exists::<
1543 + BatchedInstanceBuffers<GFBD::BufferData, GFBD::BufferInputData>,
1544 + >)
|
help: disambiguate the method for candidate #2
|
1542 ~ bevy_ecs::observer::ObserverSystemExt::run_if(gpu_preprocessing::write_binned_instance_buffers::<BPI, GFBD>, resource_exists::<
1543 + BatchedInstanceBuffers<GFBD::BufferData, GFBD::BufferInputData>,
1544 + >)
|
Building [=======================> ] 541/563: bevy_light, bevy_picking, b…
error[E0034]: multiple applicable items in scope
--> /home/felix/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bevy_render-0.19.1/src/render_phase/mod.rs:1551:26
|
1551 | .run_if(
| ^^^^^^ multiple `run_if` found
|
= note: candidate #1 is defined in an impl of the trait `bevy_ecs::schedule::IntoScheduleConfigs` for the type `F`
= note: candidate #2 is defined in an impl of the trait `bevy_ecs::observer::ObserverSystemExt` for the type `T`
help: disambiguate the method for candidate #1
|
1550 ~ bevy_ecs::schedule::IntoScheduleConfigs::run_if(gpu_preprocessing::collect_buffers_for_phase::<BPI, GFBD>, resource_exists::<
1551 + BatchedInstanceBuffers<GFBD::BufferData, GFBD::BufferInputData>,
1552 + >)
|
help: disambiguate the method for candidate #2
|
1550 ~ bevy_ecs::observer::ObserverSystemExt::run_if(gpu_preprocessing::collect_buffers_for_phase::<BPI, GFBD>, resource_exists::<
1551 + BatchedInstanceBuffers<GFBD::BufferData, GFBD::BufferInputData>,
1552 + >)
|
Building [=======================> ] 541/563: bevy_light, bevy_picking, b…
error[E0034]: multiple applicable items in scope
--> /home/felix/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bevy_render-0.19.1/src/render_phase/mod.rs:1652:30
|
1652 | ... .run_if(resource_exists::<BatchedInstanceBuffer<GFBD::BufferData...
| ^^^^^^ multiple `run_if` found
|
= note: candidate #1 is defined in an impl of the trait `bevy_ecs::schedule::IntoScheduleConfigs` for the type `F`
= note: candidate #2 is defined in an impl of the trait `bevy_ecs::observer::ObserverSystemExt` for the type `T`
help: disambiguate the method for candidate #1
|
1651 - no_gpu_preprocessing::batch_and_prepare_sorted_render_phase::<SPI, GFBD>
1652 - .run_if(resource_exists::<BatchedInstanceBuffer<GFBD::BufferData>>),
1651 + bevy_ecs::schedule::IntoScheduleConfigs::run_if(no_gpu_preprocessing::batch_and_prepare_sorted_render_phase::<SPI, GFBD>, resource_exists::<BatchedInstanceBuffer<GFBD::BufferData>>),
|
help: disambiguate the method for candidate #2
|
1651 - no_gpu_preprocessing::batch_and_prepare_sorted_render_phase::<SPI, GFBD>
1652 - .run_if(resource_exists::<BatchedInstanceBuffer<GFBD::BufferData>>),
1651 + bevy_ecs::observer::ObserverSystemExt::run_if(no_gpu_preprocessing::batch_and_prepare_sorted_render_phase::<SPI, GFBD>, resource_exists::<BatchedInstanceBuffer<GFBD::BufferData>>),
|
Building [=======================> ] 541/563: bevy_light, bevy_picking, b…
error[E0034]: multiple applicable items in scope
--> /home/felix/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bevy_render-0.19.1/src/render_phase/mod.rs:1654:30
|
1654 | ... .run_if(
| ^^^^^^ multiple `run_if` found
|
= note: candidate #1 is defined in an impl of the trait `bevy_ecs::schedule::IntoScheduleConfigs` for the type `F`
= note: candidate #2 is defined in an impl of the trait `bevy_ecs::observer::ObserverSystemExt` for the type `T`
help: disambiguate the method for candidate #1
|
1653 ~ bevy_ecs::schedule::IntoScheduleConfigs::run_if(gpu_preprocessing::batch_and_prepare_sorted_render_phase::<SPI, GFBD>, resource_exists::<
1654 + BatchedInstanceBuffers<GFBD::BufferData, GFBD::BufferInputData>,
1655 ~ >),
|
help: disambiguate the method for candidate #2
|
1653 ~ bevy_ecs::observer::ObserverSystemExt::run_if(gpu_preprocessing::batch_and_prepare_sorted_render_phase::<SPI, GFBD>, resource_exists::<
1654 + BatchedInstanceBuffers<GFBD::BufferData, GFBD::BufferInputData>,
1655 ~ >),
|
Building [=======================> ] 541/563: bevy_light, bevy_picking, b…
error[E0034]: multiple applicable items in scope
--> /home/felix/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bevy_render-0.19.1/src/render_phase/mod.rs:1662:26
|
1662 | .run_if(
| ^^^^^^ multiple `run_if` found
|
= note: candidate #1 is defined in an impl of the trait `bevy_ecs::schedule::IntoScheduleConfigs` for the type `F`
= note: candidate #2 is defined in an impl of the trait `bevy_ecs::observer::ObserverSystemExt` for the type `T`
help: disambiguate the method for candidate #1
|
1661 ~ bevy_ecs::schedule::IntoScheduleConfigs::run_if(gpu_preprocessing::collect_buffers_for_phase::<SPI, GFBD>, resource_exists::<
1662 + BatchedInstanceBuffers<GFBD::BufferData, GFBD::BufferInputData>,
1663 + >)
|
help: disambiguate the method for candidate #2
|
1661 ~ bevy_ecs::observer::ObserverSystemExt::run_if(gpu_preprocessing::collect_buffers_for_phase::<SPI, GFBD>, resource_exists::<
1662 + BatchedInstanceBuffers<GFBD::BufferData, GFBD::BufferInputData>,
1663 + >)
|
Building [=======================> ] 541/563: bevy_light, bevy_picking, b…
error[E0034]: multiple applicable items in scope
--> /home/felix/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bevy_render-0.19.1/src/view/window/mod.rs:42:26
|
42 | .run_if(need_surface_configuration)
| ^^^^^^ multiple `run_if` found
|
= note: candidate #1 is defined in an impl of the trait `bevy_ecs::schedule::IntoScheduleConfigs` for the type `F`
= note: candidate #2 is defined in an impl of the trait `bevy_ecs::observer::ObserverSystemExt` for the type `T`
help: disambiguate the method for candidate #1
|
41 - create_surfaces
42 - .run_if(need_surface_configuration)
41 + bevy_ecs::schedule::IntoScheduleConfigs::run_if(create_surfaces, need_surface_configuration)
|
help: disambiguate the method for candidate #2
|
41 - create_surfaces
42 - .run_if(need_surface_configuration)
41 + bevy_ecs::observer::ObserverSystemExt::run_if(create_surfaces, need_surface_configuration)
|
Additional information
- New trait solver was enabled by default on nightly in this rustc version.
RUSTFLAGES=-Znext-solver=coherencefixes it (by falling back on the old solver).- Discord discussion: https://discord.com/channels/691052431525675048/691052431974465548/1540705958370611201
- Rust announcement post for enabling the new solver by default on nightly: https://blog.rust-lang.org/2026/08/21/enabling-next-solver-on-nightly/
- Bug report for this issue in rustc: Spurious E0034 for trait methods coming from blanket impl on functions which already have other errors rust-lang/rust#161544
Metadata
Metadata
Assignees
Labels
C-BugAn unexpected or incorrect behaviorI-Compile-FailureA failure to compile Bevy appsS-BlockedThis cannot move forward until something else changesS-Needs-InvestigationThis issue requires detective work to figure out what's going wrong
Activity
[-]bevy_render 0.19.1 doesn't compile with next-solver[/-][+]bevy_render 0.19.1 doesn't compile on current Rust nightly due to next-solver enabled by default[/+][-]bevy_render 0.19.1 doesn't compile on current Rust nightly due to next-solver enabled by default[/-][+]bevy_render 0.19.1 doesn't compile on current Rust nightly due to `-Znext-solver` enabled by default[/+]laundmo commentedon Aug 22, 2026
I'm investigating this, to hopefully find a small reproduction so we can know if its one of the intended breakages and we need to do something or its an issue with next-solver.
Until then, i'm going to leave "Blocked" as a label
laundmo commentedon Aug 22, 2026
Okay, it seems to be that the reported error is not actually whats going wrong, and instead is a symptom of the underlying error: bevy_render regularily exceeds the rustc type resolution recurision limit, which has been turned into a warning, which for some reason means its hidden when compiling as a dependency
lcnr commentedon Aug 22, 2026
is that fixed by rust-lang/rust#161341?
lcnr commentedon Aug 22, 2026
(testing it myself rn and will try to fast-track that PR if it's the issue)
futile commentedon Aug 22, 2026
Investigation/discussion is also happening here currently (bevy discord), incl. someone else also testing out the PR you linked: https://discord.com/channels/691052431525675048/1540728195341623316
lcnr commentedon Aug 22, 2026
this will be fixed by rust-lang/rust#161552
futile commentedon Aug 22, 2026
To be clear - will this fix the actual error or surface the underlying overflow that's currently being hidden?
If I understand correctly, rust-lang/rust#161552 will make the overflow show up that is currently not being warned/errored about by rustc.
The compilation error in my OP post will (independently) need fixing by, e.g., introducing intermediary (auto) trait impls to prevent the underlying overflow from occurring?
Thanks already for helping investigate this <3
1 remaining item
futile commentedon Aug 22, 2026
Ohh got it, awesome, ty! Now it all makes sense as well :)
fix: remove rustc-codegen-cranelift-preview due to bevyengine/bevy#25511
Rollup merge of rust-lang#161552 - lcnr:overflow-fcw-chain, r=adwinwhite
Rollup merge of rust-lang#161552 - lcnr:overflow-fcw-chain, r=adwinwhite
Unrolled build for #161552 in rollup 161638
fix: duplicate component updates (#10)
Rollup merge of #161552 - lcnr:overflow-fcw-chain, r=adwinwhite
futile commentedon Aug 25, 2026
Tested and confirmed solved with the 2026-08-24 nightly! :)
analytik commentedon Aug 26, 2026
Not sure if this is the right place to report this (cross-posting from rust-lang/rust#161552 just in case anyone looks for it here), but bevy_render, while compiling correctly with the new trait solver, also takes 3700 seconds with it, and 100 seconds with the old one.
Using
rustc 1.100.0-nightly (787af2b8c 2026-08-25)on both host+target x86_64-pc-windows-msvc, with bevy's feature dynamic_linking turned on.laundmo commentedon Aug 26, 2026
I'm relatively sure neither here or the linked rust issue are the correct place to report this. For bevy, it'd be a new issue, since this likely is separate from specifically the overflow, and for rust it'd proably also be a new issue if its a previously unknown issue or a comment in the next-solver enabled by default issues
lcnr commentedon Aug 27, 2026
This is likely due to rust-lang/rust#161748. We're (the people working on the new trait solver) are currently looking into this
Switch WgpuWrapper to a macro and have it compute `Send`/`Sync` eager…
Switch WgpuWrapper to a macro and have it compute `Send`/`Sync` eager…
Switch WgpuWrapper to a macro and have it compute `Send`/`Sync` eager…