Repository: rust
Issue: ICE: Alias does not have fields when compiling bevy-inspector-egui
Labels: I-ICE,T-compiler,C-bug

<!--
Thank you for finding an Internal Compiler Error! 🧊  If possible, try to provide
a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for
how to create smaller examples.
http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/
-->

### Code

Just tried to compile space editor in release mode and got the following error output


### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`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
```