Open nicopap opened 2 years ago
Triage: Thank you for taking the time to report this. Can this still be reproduced? The reproducer does not necessarily need to be minimal, but it needs to be easy. In the spirit of "copy paste these bash commands". Otherwise the effort to look into this ICE will be too high compared to the hundreds of other ICE reports we have.
Code
Sorry, I simply cannot create a minimal example, given it seems to result from an interaction with bevy's
Query
type and associated types (which is far from trivial to reproduce).You'll get a link instead:
Please clone locally and run
cargo check --package bevy_pbr
.The code in question is in
crates/bevy_pbr/src/render/mesh.rs
line 112 to 136.The diff is reproduced here for your enjoyment:
I think the ICE comes from the typing of the
is_visible
andmesh_bundle
closures, which has the input typed asExtractMeshItem
, which is defined as so:QueryItem
being itself a "simple" type alias:Which everyone in the bevy community will tell you is a godsend.
Now, if I replace the definition of
ExtractMeshItem
as follow:The code compiles as if nothing and the ICE is not triggered. Which is as close to a smoking gun you'll get here.
Meta
rustc --version --verbose
:Also tested with:
rustc 1.62.0-nightly (082e4ca49 2022-04-26)
rustc 1.59.0 (9d1b2106e 2022-02-23)
CARGO_INCREMENTAL=0
and default.Error output
Backtrace
``` thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', compiler/rustc_errors/src/lib.rs:1176:13 stack backtrace: 0: rust_begin_unwind at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:584:5 1: core::panicking::panic_fmt at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/panicking.rs:143:14 2: core::panicking::panic_display::<&str> 3:::flush_delayed
4: ::drop
5: core::ptr::drop_in_place::
6: as core::ops::drop::Drop>::drop
7: core::ptr::drop_in_place::
8: rustc_interface::interface::create_compiler_and_run::, rustc_driver::run_compiler::{closure#1}>
```
bonus nightly backtrace:
```
thread 'rustc' panicked at 'Box', compiler/rustc_errors/src/lib.rs:1347:13
stack backtrace:
0: std::panicking::begin_panic::
1: std::panic::panic_any::
2: ::drop
3: core::ptr::drop_in_place::
4: as core::ops::drop::Drop>::drop
5: core::ptr::drop_in_place::
6: rustc_span::with_source_map::, rustc_interface::interface::create_compiler_and_run, rustc_driver::run_compiler::{closure#1}>::{closure#1}>
7: rustc_interface::interface::create_compiler_and_run::, rustc_driver::run_compiler::{closure#1}>
8: >::set::, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
```