rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
99.12k stars 12.8k forks source link

internal compiler error: broken MIR in Item with bevy-inspector-egui-0.19.0 #116394

Open jfkw opened 1 year ago

jfkw commented 1 year ago

When building https://github.com/kaosat-dev/Blender_bevy_components_workflow as of 868fa163e0205050dd262ad93a0fcafd496ee4d7 , basic example, rustc emits the following internal compiler error:

Code

error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: broken MIR in Item(DefId(0:152 ~ bevy_inspector_egui[ba3a]::bevy_inspector::ui_for_entity_components::{closure#3})) (after phase change to runtime-optimized) at bb5[4]:
                                Alias(Opaque, AliasTy { args: [ReErased, ReErased], def_id: DefId(0:2162 ~ bevy_inspector_egui[ba3a]::restricted_world_view::{impl#3}::get_entity_component_reflect::{opaque#0}) }) does not have fields
   --> /home/myuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy-inspector-egui-0.19.0/src/bevy_inspector/mod.rs:401:17
    |
401 |                 set_changed();
    |                 ^^^^^^^^^^^
    |

Meta

rustc --version --verbose:

rustc 1.75.0-nightly (2e5a9dd6c 2023-10-02)
binary: rustc
commit-hash: 2e5a9dd6c9eaa42f0684b4b760bd68fc27cbe51b
commit-date: 2023-10-02
host: x86_64-unknown-linux-gnu
release: 1.75.0-nightly
LLVM version: 17.0.2

Error output

Blender_bevy_components_workflow> RUST_BACKTRACE=1 cargo run --example basic
warning: /home/myuser/rust/Blender_bevy_components_workflow/Cargo.toml: unused manifest key: profile.dev.package.bevy.features
   Compiling proc-macro2 v1.0.67
   Compiling unicode-ident v1.0.11
   Compiling cfg-if v1.0.0
   Compiling autocfg v1.1.0
   Compiling libc v0.2.147
   Compiling serde v1.0.188
   Compiling version_check v0.9.4
   Compiling once_cell v1.18.0
   Compiling bitflags v1.3.2
   Compiling scopeguard v1.2.0
   Compiling parking_lot_core v0.9.8
   Compiling rustc-hash v1.1.0
   Compiling crossbeam-utils v0.8.16
   Compiling memchr v2.5.0
   Compiling thiserror v1.0.44
   Compiling libm v0.2.7
   Compiling equivalent v1.0.1
   Compiling hashbrown v0.14.0
   Compiling quote v1.0.32
   Compiling ahash v0.7.6
   Compiling syn v2.0.37
   Compiling lock_api v0.4.10
   Compiling indexmap v1.9.3
   Compiling getrandom v0.2.10
   Compiling ahash v0.8.3
   Compiling num-traits v0.2.16
   Compiling hashbrown v0.12.3
   Compiling indexmap v2.0.0
   Compiling log v0.4.19
   Compiling pin-project-lite v0.2.10
   Compiling winnow v0.5.0
   Compiling toml_datetime v0.6.3
   Compiling slab v0.4.8
   Compiling tracing-core v0.1.31
   Compiling futures-core v0.3.28
   Compiling instant v0.1.12
   Compiling event-listener v2.5.3
   Compiling allocator-api2 v0.2.16
   Compiling concurrent-queue v2.2.0
   Compiling fastrand v1.9.0
   Compiling futures-io v0.3.28
   Compiling erased-serde v0.3.28
   Compiling fixedbitset v0.4.2
   Compiling waker-fn v1.1.0
   Compiling parking v2.1.0
   Compiling bit-vec v0.6.3
   Compiling downcast-rs v1.2.0
   Compiling futures-lite v1.13.0
   Compiling async-lock v2.7.0
   Compiling bit-set v0.5.3
   Compiling uuid v1.4.1
   Compiling async-task v4.4.0
   Compiling async-channel v1.9.0
   Compiling toml_edit v0.19.14
   Compiling thread_local v1.1.7
   Compiling smol_str v0.2.0
   Compiling bevy_ptr v0.11.2
   Compiling aho-corasick v1.0.2
   Compiling async-executor v1.5.1
   Compiling regex-syntax v0.7.4
   Compiling syn v1.0.109
   Compiling bevy_tasks v0.11.2
   Compiling lazy_static v1.4.0
   Compiling regex-syntax v0.6.29
   Compiling bevy_macro_utils v0.11.2
   Compiling regex-automata v0.3.3
   Compiling regex v1.9.1
   Compiling regex-automata v0.1.10
   Compiling overload v0.1.1
   Compiling nu-ansi-term v0.46.0
   Compiling matchers v0.1.0
   Compiling tracing-log v0.1.3
   Compiling sharded-slab v0.1.4
   Compiling num-integer v0.1.45
   Compiling crossbeam-channel v0.5.8
   Compiling pkg-config v0.3.27
   Compiling byteorder v1.4.3
   Compiling num-rational v0.4.1
   Compiling static_assertions v1.1.0
   Compiling raw-window-handle v0.5.2
   Compiling mio v0.8.8
   Compiling termcolor v1.2.0
   Compiling unicode-width v0.1.10
   Compiling unicode-xid v0.2.4
   Compiling simd-adler32 v0.3.5
   Compiling crc32fast v1.3.2
   Compiling arrayvec v0.7.4
   Compiling pp-rs v0.2.1
   Compiling codespan-reporting v0.11.1
   Compiling spirv v0.2.0+1.5.4
   Compiling libloading v0.7.4
   Compiling khronos-egl v4.1.0
   Compiling adler v1.0.2
   Compiling ash v0.37.3+1.3.251
   Compiling hexf-parse v0.2.1
   Compiling miniz_oxide v0.7.1
   Compiling inotify-sys v0.1.5
   Compiling gpu-alloc-types v0.2.0
   Compiling gpu-descriptor-types v0.1.1
   Compiling anyhow v1.0.72
   Compiling same-file v1.0.6
   Compiling walkdir v2.3.3
   Compiling gpu-descriptor v0.2.3
   Compiling gpu-alloc v0.5.4
   Compiling flate2 v1.0.26
   Compiling inotify v0.9.6
   Compiling fdeflate v0.3.0
   Compiling encase_derive_impl v0.6.1
   Compiling sysinfo v0.29.6
   Compiling filetime v0.2.21
   Compiling libloading v0.8.0
   Compiling thiserror-core v1.0.38
   Compiling profiling v1.0.8
   Compiling renderdoc-sys v1.0.0
   Compiling glow v0.12.3
   Compiling notify v6.0.1
   Compiling png v0.17.9
   Compiling color_quant v1.1.0
   Compiling const_soft_float v0.1.4
   Compiling constgebra v0.1.3
   Compiling twox-hash v1.6.3
   Compiling data-encoding v2.4.0
   Compiling const_panic v0.2.8
   Compiling ktx2 v0.3.0
   Compiling memoffset v0.6.5
   Compiling ttf-parser v0.19.1
   Compiling approx v0.5.1
   Compiling ab_glyph_rasterizer v0.1.8
   Compiling tinyvec_macros v0.1.1
   Compiling tinyvec v1.6.0
   Compiling nix v0.24.3
   Compiling percent-encoding v2.3.0
   Compiling thiserror-core-impl v1.0.38
   Compiling owned_ttf_parser v0.19.0
   Compiling serde_derive v1.0.188
   Compiling bytemuck_derive v1.4.1
   Compiling thiserror-impl v1.0.44
   Compiling tracing-attributes v0.1.26
   Compiling bevy_utils_proc_macros v0.11.2
   Compiling bevy_reflect_derive v0.11.2
   Compiling bevy_ecs_macros v0.11.2
   Compiling bevy_derive v0.11.2
   Compiling bytemuck v1.13.1
   Compiling image v0.24.6
   Compiling encase_derive v0.6.1
   Compiling ruzstd v0.4.0
   Compiling bevy_render_macros v0.11.2
   Compiling bevy_encase_derive v0.11.2
   Compiling ab_glyph v0.2.21
   Compiling tracing v0.1.37
   Compiling radsort v0.1.0
   Compiling alsa-sys v0.3.1
   Compiling xml-rs v0.8.16
   Compiling libudev-sys v0.1.4
   Compiling x11-dl v2.21.0
   Compiling wayland-scanner v0.29.5
   Compiling euclid v0.22.9
   Compiling svg_fmt v0.4.1
   Compiling cfg_aliases v0.1.1
   Compiling serde_json v1.0.103
   Compiling guillotiere v0.6.2
   Compiling slotmap v1.0.6
   Compiling cpal v0.15.2
   Compiling itoa v1.0.9
   Compiling ryu v1.0.15
   Compiling inflections v1.1.1
   Compiling rectangle-pack v0.4.2
   Compiling accesskit v0.11.0
   Compiling gltf-derive v1.2.0
   Compiling alsa v0.7.0
   Compiling nix v0.26.2
   Compiling winit v0.28.6
   Compiling ogg v0.8.0
   Compiling vec_map v0.8.2
   Compiling gilrs v0.10.2
   Compiling base64 v0.21.4
   Compiling xi-unicode v0.3.0
   Compiling no-std-compat v0.4.1
   Compiling dasp_sample v0.11.0
   Compiling glyph_brush_layout v0.2.3
   Compiling grid v0.9.0
   Compiling lewton v0.10.2
   Compiling fnv v1.0.7
   Compiling base64 v0.13.1
   Compiling smallvec v1.11.0
   Compiling glam v0.24.1
   Compiling parking_lot v0.12.1
   Compiling petgraph v0.6.3
   Compiling tracing-subscriber v0.3.17
   Compiling bitflags v2.3.3
   Compiling naga v0.12.3
   Compiling wgpu-types v0.16.1
   Compiling bevy_utils v0.11.2
   Compiling bevy_math v0.11.2
   Compiling bevy_reflect v0.11.2
   Compiling encase v0.6.1
   Compiling hexasphere v9.1.0
   Compiling bevy_mikktspace v0.11.2
   Compiling ron v0.8.1
   Compiling bevy_ecs v0.11.2
   Compiling wgpu-hal v0.16.2
   Compiling naga_oil v0.8.1
   Compiling bevy_app v0.11.2
   Compiling wgpu-core v0.16.1
   Compiling bevy_log v0.11.2
   Compiling bevy_core v0.11.2
   Compiling bevy_time v0.11.2
   Compiling bevy_hierarchy v0.11.2
   Compiling bevy_input v0.11.2
   Compiling bevy_diagnostic v0.11.2
   Compiling bevy_window v0.11.2
   Compiling bevy_asset v0.11.2
   Compiling bevy_transform v0.11.2
   Compiling wgpu v0.16.3
   Compiling bevy_a11y v0.11.2
   Compiling gltf-json v1.2.0
   Compiling bevy_render v0.11.2
   Compiling bevy_core_pipeline v0.11.2
   Compiling bevy_sprite v0.11.2
   Compiling bevy_pbr v0.11.2
   Compiling gilrs-core v0.5.6
   Compiling bevy_text v0.11.2
   Compiling bevy_scene v0.11.2
   Compiling bevy_animation v0.11.2
   Compiling gltf v1.2.0
   Compiling accesskit_winit v0.14.1
   Compiling rodio v0.17.1
   Compiling taffy v0.3.12
   Compiling bevy_ui v0.11.2
   Compiling bevy_audio v0.11.2
   Compiling bevy_winit v0.11.2
   Compiling bevy_gltf v0.11.2
   Compiling bevy_gilrs v0.11.2
   Compiling bevy_gizmos v0.11.2
   Compiling bevy_internal v0.11.2
   Compiling bevy v0.11.2
   Compiling paste v1.0.14
   Compiling ecolor v0.22.0
   Compiling emath v0.22.0
   Compiling nohash-hasher v0.2.0
   Compiling epaint v0.22.0
   Compiling unicode-normalization v0.1.22
   Compiling proc-macro-error-attr v1.0.4
   Compiling unicode-bidi v0.3.13
   Compiling idna v0.4.0
   Compiling egui v0.22.0
   Compiling x11rb-protocol v0.10.0
   Compiling form_urlencoded v1.2.0
   Compiling gethostname v0.2.3
   Compiling memoffset v0.9.0
   Compiling proc-macro-error v1.0.4
   Compiling url v2.4.0
   Compiling x11rb v0.10.1
   Compiling safe_arch v0.7.1
   Compiling matrixmultiply v0.3.7
   Compiling crossbeam-epoch v0.9.15
   Compiling home v0.5.5
   Compiling typenum v1.16.0
   Compiling wide v0.7.11
   Compiling webbrowser v0.8.10
   Compiling arboard v3.2.0
   Compiling num-complex v0.4.3
   Compiling heck v0.4.1
   Compiling pretty-type-name v1.0.1
   Compiling crossbeam-queue v0.3.8
   Compiling rawpointer v0.2.1
   Compiling duplicate v1.0.0
   Compiling simba v0.8.1
   Compiling bevy_egui v0.21.0
   Compiling bevy-inspector-egui-derive v0.19.0
   Compiling nalgebra-macros v0.2.1
   Compiling robust v0.2.3
   Compiling optional v0.5.0
   Compiling spade v2.2.0
   Compiling egui_dock v0.6.3
   Compiling crossbeam-deque v0.8.3
   Compiling nalgebra v0.32.3
   Compiling num-derive v0.3.3
   Compiling bstr v1.6.0
   Compiling either v1.9.0
   Compiling crossbeam v0.8.2
   Compiling bevy_mod_debugdump v0.8.0
   Compiling bevy-inspector-egui v0.19.0
   Compiling bevy_editor_pls_core v0.4.0 (https://github.com/jakobhellermann/bevy_editor_pls.git#f72483a5)
   Compiling opener v0.5.2
   Compiling egui-gizmo v0.11.0
   Compiling rand_core v0.6.4
   Compiling ppv-lite86 v0.2.17
   Compiling rand_chacha v0.3.1
   Compiling bevy_editor_pls_default_windows v0.4.0 (https://github.com/jakobhellermann/bevy_editor_pls.git#f72483a5)
   Compiling bevy_common_assets v0.7.0
   Compiling bevy_gltf_components v0.1.2
   Compiling bevy_asset_loader_derive v0.17.0
   Compiling parry3d v0.13.5
   Compiling path-slash v0.2.1
   Compiling bevy_gltf_blueprints v0.1.2 (/home/myuser/rust/Blender_bevy_components_workflow/crates/bevy_gltf_blueprints)
   Compiling bevy_editor_pls v0.4.0 (https://github.com/jakobhellermann/bevy_editor_pls.git#f72483a5)
   Compiling rand v0.8.5
   Compiling rapier3d v0.17.2
   Compiling bevy_asset_loader v0.17.0
   Compiling bevy_gltf_components v0.1.3 (/home/myuser/rust/Blender_bevy_components_workflow/crates/bevy_gltf_components)
   Compiling bevy_rapier3d v0.22.0
error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: broken MIR in Item(DefId(0:152 ~ bevy_inspector_egui[ba3a]::bevy_inspector::ui_for_entity_components::{closure#3})) (after phase change to runtime-optimized) at bb5[4]:
                                Alias(Opaque, AliasTy { args: [ReErased, ReErased], def_id: DefId(0:2162 ~ bevy_inspector_egui[ba3a]::restricted_world_view::{impl#3}::get_entity_component_reflect::{opaque#0}) }) does not have fields
   --> /home/myuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy-inspector-egui-0.19.0/src/bevy_inspector/mod.rs:401:17
    |
401 |                 set_changed();
    |                 ^^^^^^^^^^^
    |
note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:94:25
         0: <rustc_errors::HandlerInner>::emit_diagnostic
         1: <rustc_errors::Handler>::delay_span_bug::<rustc_span::span_encoding::Span, alloc::string::String>
         2: <rustc_const_eval::transform::validate::CfgChecker>::fail::<alloc::string::String>
         3: <rustc_const_eval::transform::validate::Validator as rustc_middle::mir::MirPass>::run_pass
         4: rustc_mir_transform::pass_manager::run_passes_inner
         5: rustc_mir_transform::optimized_mir
         6: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::optimized_mir::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
         7: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
         8: rustc_query_impl::query_impl::optimized_mir::get_query_non_incr::__rust_end_short_backtrace
         9: <rustc_middle::ty::context::TyCtxt>::instance_mir
        10: rustc_monomorphize::collector::collect_items_rec::{closure#0}
        11: rustc_monomorphize::collector::collect_items_rec
        12: rustc_monomorphize::collector::collect_items_rec
        13: rustc_monomorphize::collector::collect_items_rec
        14: rustc_monomorphize::collector::collect_items_rec
        15: rustc_monomorphize::collector::collect_items_rec
        16: rustc_monomorphize::collector::collect_items_rec
        17: rustc_monomorphize::collector::collect_items_rec
        18: rustc_monomorphize::collector::collect_items_rec
        19: rustc_monomorphize::collector::collect_items_rec
        20: rustc_monomorphize::collector::collect_items_rec
        21: rustc_monomorphize::collector::collect_items_rec
        22: rustc_monomorphize::collector::collect_items_rec
        23: rustc_monomorphize::collector::collect_items_rec
        24: rustc_monomorphize::collector::collect_items_rec
        25: rustc_monomorphize::partitioning::collect_and_partition_mono_items
        26: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::collect_and_partition_mono_items::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 24]>>
        27: <rustc_query_impl::query_impl::collect_and_partition_mono_items::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, ())>>::call_once
        28: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 24]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
        29: rustc_query_impl::query_impl::collect_and_partition_mono_items::get_query_non_incr::__rust_end_short_backtrace
        30: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
        31: rustc_interface::passes::start_codegen
        32: <rustc_interface::queries::Queries>::ongoing_codegen
        33: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
        34: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
        35: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                   at /rustc/2e5a9dd6c9eaa42f0684b4b760bd68fc27cbe51b/library/alloc/src/boxed.rs:2007:9
        36: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                   at /rustc/2e5a9dd6c9eaa42f0684b4b760bd68fc27cbe51b/library/alloc/src/boxed.rs:2007:9
        37: std::sys::unix::thread::Thread::new::thread_start
                   at /rustc/2e5a9dd6c9eaa42f0684b4b760bd68fc27cbe51b/library/std/src/sys/unix/thread.rs:108:17
        38: start_thread
        39: __clone3
   --> /home/myuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy-inspector-egui-0.19.0/src/bevy_inspector/mod.rs:401:17
    |
401 |                 set_changed();
    |                 ^^^^^^^^^^^

error: internal compiler error: broken MIR in Item(DefId(0:152 ~ bevy_inspector_egui[ba3a]::bevy_inspector::ui_for_entity_components::{closure#3})) (after phase change to runtime-optimized) at bb5[5]:
                                Alias(Opaque, AliasTy { args: [ReErased, ReErased], def_id: DefId(0:2162 ~ bevy_inspector_egui[ba3a]::restricted_world_view::{impl#3}::get_entity_component_reflect::{opaque#0}) }) does not have fields
   --> /home/myuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy-inspector-egui-0.19.0/src/bevy_inspector/mod.rs:401:17
    |
401 |                 set_changed();
    |                 ^^^^^^^^^^^
    |
note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:94:25
         0: <rustc_errors::HandlerInner>::emit_diagnostic
         1: <rustc_errors::Handler>::delay_span_bug::<rustc_span::span_encoding::Span, alloc::string::String>
         2: <rustc_const_eval::transform::validate::CfgChecker>::fail::<alloc::string::String>
         3: <rustc_const_eval::transform::validate::Validator as rustc_middle::mir::MirPass>::run_pass
         4: rustc_mir_transform::pass_manager::run_passes_inner
         5: rustc_mir_transform::optimized_mir
         6: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::optimized_mir::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
         7: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
         8: rustc_query_impl::query_impl::optimized_mir::get_query_non_incr::__rust_end_short_backtrace
         9: <rustc_middle::ty::context::TyCtxt>::instance_mir
        10: rustc_monomorphize::collector::collect_items_rec::{closure#0}
        11: rustc_monomorphize::collector::collect_items_rec
        12: rustc_monomorphize::collector::collect_items_rec
        13: rustc_monomorphize::collector::collect_items_rec
        14: rustc_monomorphize::collector::collect_items_rec
        15: rustc_monomorphize::collector::collect_items_rec
        16: rustc_monomorphize::collector::collect_items_rec
        17: rustc_monomorphize::collector::collect_items_rec
        18: rustc_monomorphize::collector::collect_items_rec
        19: rustc_monomorphize::collector::collect_items_rec
        20: rustc_monomorphize::collector::collect_items_rec
        21: rustc_monomorphize::collector::collect_items_rec
        22: rustc_monomorphize::collector::collect_items_rec
        23: rustc_monomorphize::collector::collect_items_rec
        24: rustc_monomorphize::collector::collect_items_rec
        25: rustc_monomorphize::partitioning::collect_and_partition_mono_items
        26: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::collect_and_partition_mono_items::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 24]>>
        27: <rustc_query_impl::query_impl::collect_and_partition_mono_items::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, ())>>::call_once
        28: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 24]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
        29: rustc_query_impl::query_impl::collect_and_partition_mono_items::get_query_non_incr::__rust_end_short_backtrace
        30: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
        31: rustc_interface::passes::start_codegen
        32: <rustc_interface::queries::Queries>::ongoing_codegen
        33: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
        34: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
        35: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                   at /rustc/2e5a9dd6c9eaa42f0684b4b760bd68fc27cbe51b/library/alloc/src/boxed.rs:2007:9
        36: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                   at /rustc/2e5a9dd6c9eaa42f0684b4b760bd68fc27cbe51b/library/alloc/src/boxed.rs:2007:9
        37: std::sys::unix::thread::Thread::new::thread_start
                   at /rustc/2e5a9dd6c9eaa42f0684b4b760bd68fc27cbe51b/library/std/src/sys/unix/thread.rs:108:17
        38: start_thread
        39: __clone3
   --> /home/myuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy-inspector-egui-0.19.0/src/bevy_inspector/mod.rs:401:17
    |
401 |                 set_changed();
    |                 ^^^^^^^^^^^

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: please attach the file at `/home/myuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy-inspector-egui-0.19.0/rustc-ice-2023-10-03T18:57:47.700437557Z-1876.txt` to your bug report

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C debuginfo=2 -C debug-assertions=on -C link-arg=-fuse-ld=lld

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not compile `bevy-inspector-egui` (lib)
warning: build failed, waiting for other jobs to finish...
Backtrace

``` delayed span bug: broken MIR in Item(DefId(0:152 ~ bevy_inspector_egui[ba3a]::bevy_inspector::ui_for_entity_components::{closure#3})) (after phase change to runtime-optimized) at bb5[4]: Alias(Opaque, AliasTy { args: [ReErased, ReErased], def_id: DefId(0:2162 ~ bevy_inspector_egui[ba3a]::restricted_world_view::{impl#3}::get_entity_component_reflect::{opaque#0}) }) does not have fields 0: ::emit_diagnostic 1: ::delay_span_bug:: 2: ::fail:: 3: ::run_pass 4: rustc_mir_transform::pass_manager::run_passes_inner 5: rustc_mir_transform::optimized_mir 6: rustc_query_impl::plumbing::__rust_begin_short_backtrace::> 7: rustc_query_system::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false> 8: rustc_query_impl::query_impl::optimized_mir::get_query_non_incr::__rust_end_short_backtrace 9: ::instance_mir 10: rustc_monomorphize::collector::collect_items_rec::{closure#0} 11: rustc_monomorphize::collector::collect_items_rec 12: rustc_monomorphize::collector::collect_items_rec 13: rustc_monomorphize::collector::collect_items_rec 14: rustc_monomorphize::collector::collect_items_rec 15: rustc_monomorphize::collector::collect_items_rec 16: rustc_monomorphize::collector::collect_items_rec 17: rustc_monomorphize::collector::collect_items_rec 18: rustc_monomorphize::collector::collect_items_rec 19: rustc_monomorphize::collector::collect_items_rec 20: rustc_monomorphize::collector::collect_items_rec 21: rustc_monomorphize::collector::collect_items_rec 22: rustc_monomorphize::collector::collect_items_rec 23: rustc_monomorphize::collector::collect_items_rec 24: rustc_monomorphize::collector::collect_items_rec 25: rustc_monomorphize::partitioning::collect_and_partition_mono_items 26: rustc_query_impl::plumbing::__rust_begin_short_backtrace::> 27: >::call_once 28: rustc_query_system::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false> 29: rustc_query_impl::query_impl::collect_and_partition_mono_items::get_query_non_incr::__rust_end_short_backtrace 30: ::codegen_crate 31: rustc_interface::passes::start_codegen 32: ::ongoing_codegen 33: std::sys_common::backtrace::__rust_begin_short_backtrace::, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>> 34: <::spawn_unchecked_, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 35: as core::ops::function::FnOnce>::call_once at /rustc/2e5a9dd6c9eaa42f0684b4b760bd68fc27cbe51b/library/alloc/src/boxed.rs:2007:9 36: as core::ops::function::FnOnce>::call_once at /rustc/2e5a9dd6c9eaa42f0684b4b760bd68fc27cbe51b/library/alloc/src/boxed.rs:2007:9 37: std::sys::unix::thread::Thread::new::thread_start at /rustc/2e5a9dd6c9eaa42f0684b4b760bd68fc27cbe51b/library/std/src/sys/unix/thread.rs:108:17 38: start_thread 39: __clone3 delayed span bug: broken MIR in Item(DefId(0:152 ~ bevy_inspector_egui[ba3a]::bevy_inspector::ui_for_entity_components::{closure#3})) (after phase change to runtime-optimized) at bb5[5]: Alias(Opaque, AliasTy { args: [ReErased, ReErased], def_id: DefId(0:2162 ~ bevy_inspector_egui[ba3a]::restricted_world_view::{impl#3}::get_entity_component_reflect::{opaque#0}) }) does not have fields 0: ::emit_diagnostic 1: ::delay_span_bug:: 2: ::fail:: 3: ::run_pass 4: rustc_mir_transform::pass_manager::run_passes_inner 5: rustc_mir_transform::optimized_mir 6: rustc_query_impl::plumbing::__rust_begin_short_backtrace::> 7: rustc_query_system::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false> 8: rustc_query_impl::query_impl::optimized_mir::get_query_non_incr::__rust_end_short_backtrace 9: ::instance_mir 10: rustc_monomorphize::collector::collect_items_rec::{closure#0} 11: rustc_monomorphize::collector::collect_items_rec 12: rustc_monomorphize::collector::collect_items_rec 13: rustc_monomorphize::collector::collect_items_rec 14: rustc_monomorphize::collector::collect_items_rec 15: rustc_monomorphize::collector::collect_items_rec 16: rustc_monomorphize::collector::collect_items_rec 17: rustc_monomorphize::collector::collect_items_rec 18: rustc_monomorphize::collector::collect_items_rec 19: rustc_monomorphize::collector::collect_items_rec 20: rustc_monomorphize::collector::collect_items_rec 21: rustc_monomorphize::collector::collect_items_rec 22: rustc_monomorphize::collector::collect_items_rec 23: rustc_monomorphize::collector::collect_items_rec 24: rustc_monomorphize::collector::collect_items_rec 25: rustc_monomorphize::partitioning::collect_and_partition_mono_items 26: rustc_query_impl::plumbing::__rust_begin_short_backtrace::> 27: >::call_once 28: rustc_query_system::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false> 29: rustc_query_impl::query_impl::collect_and_partition_mono_items::get_query_non_incr::__rust_end_short_backtrace 30: ::codegen_crate 31: rustc_interface::passes::start_codegen 32: ::ongoing_codegen 33: std::sys_common::backtrace::__rust_begin_short_backtrace::, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>> 34: <::spawn_unchecked_, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 35: as core::ops::function::FnOnce>::call_once at /rustc/2e5a9dd6c9eaa42f0684b4b760bd68fc27cbe51b/library/alloc/src/boxed.rs:2007:9 36: as core::ops::function::FnOnce>::call_once at /rustc/2e5a9dd6c9eaa42f0684b4b760bd68fc27cbe51b/library/alloc/src/boxed.rs:2007:9 37: std::sys::unix::thread::Thread::new::thread_start at /rustc/2e5a9dd6c9eaa42f0684b4b760bd68fc27cbe51b/library/std/src/sys/unix/thread.rs:108:17 38: start_thread 39: __clone3 rustc version: 1.75.0-nightly (2e5a9dd6c 2023-10-02) platform: x86_64-unknown-linux-gnu ```

spookyvision commented 1 year ago

I'm hitting this too on stable:

rustc 1.74.0 (79e9716c9 2023-11-13)
binary: rustc
commit-hash: 79e9716c980570bfd1f666e3b16ac583f0168962
commit-date: 2023-11-13
host: aarch64-apple-darwin
release: 1.74.0
LLVM version: 17.0.4
spookyvision commented 1 year ago

apparently a duplicate of https://github.com/rust-lang/rust/issues/117976 at least according to the discussion found here