Skip to content

ICE: Alias does not have fields when compiling bevy-inspector-egui #118025

@naomijub

Description

@naomijub

Code

Just tried to compile space editor in release mode and got the following error output

Meta

rustc --version --verbose:

rustc 1.74.0 (79e9716c9 2023-11-13)
binary: rustc
commit-hash: 79e9716c980570bfd1f666e3b16ac583f0168962
commit-date: 2023-11-13
host: x86_64-pc-windows-msvc
release: 1.74.0
LLVM version: 17.0.4

Error output

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

error: internal compiler error: broken MIR in Item(DefId(0:154 ~ bevy_inspector_egui[5a8c]::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:2230 ~ bevy_inspector_egui[5a8c]::restricted_world_view::{impl#3}::get_entity_component_reflect::{opaque#0}) }) does not have fields
   --> C:\Users\jnboe\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy-inspector-egui-0.21.0\src\bevy_inspector\mod.rs:415:17
    |
415 |                 set_changed();
    |                 ^^^^^^^^^^^
    |
note: delayed at compiler\rustc_const_eval\src\transform\validate.rs:94:25
         0: std::backtrace::Backtrace::disabled
         1: std::backtrace::Backtrace::capture
         2: <rustc_errors::HandlerInner>::emit_diagnostic
         3: rustc_const_eval::util::type_name::type_name
         4: <rustc_const_eval::transform::check_consts::post_drop_elaboration::CheckLiveDrops as rustc_middle::mir::visit::Visitor>::visit_terminator
         5: <rustc_const_eval::transform::validate::Validator as rustc_middle::mir::MirPass>::run_pass
         6: <rustc_mir_transform::dead_store_elimination::DeadStoreElimination as rustc_middle::mir::MirPass>::run_pass
         7: rustc_mir_transform::run_analysis_to_runtime_passes
         8: <rustc_query_impl::plumbing::QueryCtxt as rustc_query_system::query::QueryContext>::load_side_effects
         9: <windows::Windows::Win32::Globalization::CPINFO as core::cmp::PartialEq>::eq
        10: <rustc_query_impl::plumbing::QueryCtxt as rustc_query_system::query::QueryContext>::load_side_effects
        11: <rustc_query_impl::plumbing::QueryCtxt as rustc_query_system::query::QueryContext>::load_side_effects
        12: <rustc_middle::ty::context::TyCtxt>::instance_mir
        13: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_constant
        14: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        15: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        16: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        17: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        18: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        19: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        20: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        21: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        22: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        23: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        24: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        25: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        26: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        27: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        28: <regex::re_set::unicode::SetMatchesIntoIter as core::iter::traits::iterator::Iterator>::size_hint
        29: <regex::re_set::unicode::SetMatchesIntoIter as core::iter::traits::iterator::Iterator>::size_hint
        30: rustc_monomorphize::provide
        31: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_constant
        32: rustc_query_impl::profiling_support::alloc_self_profile_query_strings
        33: rustc_query_impl::profiling_support::alloc_self_profile_query_strings
        34: rustc_query_impl::profiling_support::alloc_self_profile_query_strings
        35: rustc_query_impl::profiling_support::alloc_self_profile_query_strings
        36: <rustc_codegen_llvm::llvm_::ffi::debuginfo::DebugEmissionKind>::from_generic
        37: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
        38: <rustc_interface::queries::Linker>::link
        39: rustc_interface::passes::start_codegen
        40: <rustc_interface::queries::Linker>::link
        41: <rustc_interface::queries::Queries>::ongoing_codegen
        42: <rustc_middle::ty::SymbolName as core::fmt::Display>::fmt
        43: <rustc_middle::ty::SymbolName as core::fmt::Display>::fmt
        44: <rustc_middle::ty::SymbolName as core::fmt::Display>::fmt
        45: std::sys::windows::thread::Thread::new
        46: BaseThreadInitThunk
        47: RtlUserThreadStart
   --> C:\Users\jnboe\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy-inspector-egui-0.21.0\src\bevy_inspector\mod.rs:415:17
    |
415 |                 set_changed();
    |                 ^^^^^^^^^^^

error: internal compiler error: broken MIR in Item(DefId(0:154 ~ bevy_inspector_egui[5a8c]::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:2230 ~ bevy_inspector_egui[5a8c]::restricted_world_view::{impl#3}::get_entity_component_reflect::{opaque#0}) }) does not have fields
   --> C:\Users\jnboe\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy-inspector-egui-0.21.0\src\bevy_inspector\mod.rs:415:17
    |
415 |                 set_changed();
    |                 ^^^^^^^^^^^
    |
note: delayed at compiler\rustc_const_eval\src\transform\validate.rs:94:25
         0: std::backtrace::Backtrace::disabled
         1: std::backtrace::Backtrace::capture
         2: <rustc_errors::HandlerInner>::emit_diagnostic
         3: rustc_const_eval::util::type_name::type_name
         4: <rustc_const_eval::transform::check_consts::post_drop_elaboration::CheckLiveDrops as rustc_middle::mir::visit::Visitor>::visit_terminator
         5: <rustc_const_eval::transform::validate::Validator as rustc_middle::mir::MirPass>::run_pass
         6: <rustc_mir_transform::dead_store_elimination::DeadStoreElimination as rustc_middle::mir::MirPass>::run_pass
         7: rustc_mir_transform::run_analysis_to_runtime_passes
         8: <rustc_query_impl::plumbing::QueryCtxt as rustc_query_system::query::QueryContext>::load_side_effects
         9: <windows::Windows::Win32::Globalization::CPINFO as core::cmp::PartialEq>::eq
        10: <rustc_query_impl::plumbing::QueryCtxt as rustc_query_system::query::QueryContext>::load_side_effects
        11: <rustc_query_impl::plumbing::QueryCtxt as rustc_query_system::query::QueryContext>::load_side_effects
        12: <rustc_middle::ty::context::TyCtxt>::instance_mir
        13: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_constant
        14: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        15: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        16: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        17: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        18: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        19: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        20: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        21: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        22: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        23: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        24: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        25: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        26: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        27: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_operand
        28: <regex::re_set::unicode::SetMatchesIntoIter as core::iter::traits::iterator::Iterator>::size_hint
        29: <regex::re_set::unicode::SetMatchesIntoIter as core::iter::traits::iterator::Iterator>::size_hint
        30: rustc_monomorphize::provide
        31: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_constant
        32: rustc_query_impl::profiling_support::alloc_self_profile_query_strings
        33: rustc_query_impl::profiling_support::alloc_self_profile_query_strings
        34: rustc_query_impl::profiling_support::alloc_self_profile_query_strings
        35: rustc_query_impl::profiling_support::alloc_self_profile_query_strings
        36: <rustc_codegen_llvm::llvm_::ffi::debuginfo::DebugEmissionKind>::from_generic
        37: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
        38: <rustc_interface::queries::Linker>::link
        39: rustc_interface::passes::start_codegen
        40: <rustc_interface::queries::Linker>::link
        41: <rustc_interface::queries::Queries>::ongoing_codegen
        42: <rustc_middle::ty::SymbolName as core::fmt::Display>::fmt
        43: <rustc_middle::ty::SymbolName as core::fmt::Display>::fmt
        44: <rustc_middle::ty::SymbolName as core::fmt::Display>::fmt
        45: std::sys::windows::thread::Thread::new
        46: BaseThreadInitThunk
        47: RtlUserThreadStart
   --> C:\Users\jnboe\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy-inspector-egui-0.21.0\src\bevy_inspector\mod.rs:415:17
    |
415 |                 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: rustc 1.74.0 (79e9716c9 2023-11-13) running on x86_64-pc-windows-msvc

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no

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

query stack during panic:
end of query stack

Activity

added
C-bugCategory: This is a bug.
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Nov 17, 2023
added
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Nov 17, 2023
exrok

exrok commented on Nov 17, 2023

@exrok

Likely same issue as: #117976

And like #117976 both nightly and beta succeeded in building.

naomijub

naomijub commented on Nov 17, 2023

@naomijub
Author

Yes it is

removed
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Nov 17, 2023
changed the title [-]MIR Bug compiling space-editor in release mode[/-] [+]ICE: Alias does not have fields when compiling bevy-inspector-egui[/+] on Nov 19, 2023
saethlin

saethlin commented on Nov 19, 2023

@saethlin
Member

I've adjusted the title to hopefully make this issue more likely to come up in searches or visual skims of the open ICE issues.

added a commit that references this issue on Dec 10, 2023
added a commit that references this issue on Oct 26, 2024
added a commit that references this issue on Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @exrok@saethlin@naomijub@rustbot

        Issue actions

          ICE: Alias does not have fields when compiling bevy-inspector-egui · Issue #118025 · rust-lang/rust