Skip to content

ICE: Failed to normalize Alias(Opaque #151297

@matthiaskrgr

Description

@matthiaskrgr

auto-reduced (treereduce-rust):

//@compile-flags: -Zvalidate-mir -Znext-solver=globally
//

trait Quux {}

fn foo() -> impl Quux {
    struct Foo<T>(T);
    impl<T> Quux for Foo<T> {}
    Foo(bar())
}

fn bar() -> impl Quux {
    struct Bar<T>(T);
    impl<T> Quux for Bar<T> {}
    Bar(foo())
}

original:

// Test that attempts to construct infinite types via impl trait fail
// in a graceful way.
//
// Regression test for #38064.

trait Quux {}

fn foo() -> impl Quux { //~ ERROR cannot resolve opaque type
    struct Foo<T>(T);
    impl<T> Quux for Foo<T> {}
    Foo(bar())
}

fn bar() -> impl Quux { //~ ERROR cannot resolve opaque type
    struct Bar<T>(T);
    impl<T> Quux for Bar<T> {}
    Bar(foo())
}

// effectively:
//     struct Foo(Bar);
//     struct Bar(Foo);
// should produce an error about infinite size

fn main() { foo(); }

Version information

rustc 1.95.0-nightly (621d76794 2026-01-18)
binary: rustc
commit-hash: 621d76794c76fc21c0a6151fbc090120e0230a91
commit-date: 2026-01-18
host: x86_64-unknown-linux-gnu
release: 1.95.0-nightly
LLVM version: 21.1.8

Possibly related line of code:

fn normalize_generic_arg_after_erasing_regions(
&self,
arg: ty::GenericArg<'tcx>,
) -> ty::GenericArg<'tcx> {
let arg = self.typing_env.as_query_input(arg);
self.tcx.try_normalize_generic_arg_after_erasing_regions(arg).unwrap_or_else(|_| {
bug!(
"Failed to normalize {:?} in typing_env={:?}, \
maybe try to call `try_normalize_erasing_regions` instead",
arg.value,
self.typing_env,
)
})

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc -Zvalidate-mir -Znext-solver=globally

Program output

error[E0601]: `main` function not found in crate `mvce`
  --> /tmp/icemaker_global_tempdir.bEsLPnBIxAck/rustc_testrunner_tmpdir_reporting.QgLDyvukeBZz/mvce.rs:15:2
   |
15 | }
   |  ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.bEsLPnBIxAck/rustc_testrunner_tmpdir_reporting.QgLDyvukeBZz/mvce.rs`

error[E0720]: cannot resolve opaque type
  --> /tmp/icemaker_global_tempdir.bEsLPnBIxAck/rustc_testrunner_tmpdir_reporting.QgLDyvukeBZz/mvce.rs:5:13
   |
 5 | fn foo() -> impl Quux {
   |             ^^^^^^^^^ recursive opaque type
...
 8 |     Foo(bar())
   |     ---------- returning here with type `Foo<impl Quux>`
...
11 | fn bar() -> impl Quux {
   |             --------- returning this type `Foo<impl Quux>`

error[E0720]: cannot resolve opaque type
  --> /tmp/icemaker_global_tempdir.bEsLPnBIxAck/rustc_testrunner_tmpdir_reporting.QgLDyvukeBZz/mvce.rs:11:13
   |
 5 | fn foo() -> impl Quux {
   |             --------- returning this type `Bar<impl Quux>`
...
11 | fn bar() -> impl Quux {
   |             ^^^^^^^^^ recursive opaque type
...
14 |     Bar(foo())
   |     ---------- returning here with type `Bar<impl Quux>`

error: internal compiler error: /rustc-dev/621d76794c76fc21c0a6151fbc090120e0230a91/compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:171:13: Failed to normalize Alias(Opaque, AliasTy { args: [], def_id: DefId(0:13 ~ mvce[a621]::bar::{opaque#0}), .. }) in typing_env=TypingEnv { typing_mode: PostAnalysis, param_env: ParamEnv { caller_bounds: [] } }, maybe try to call `try_normalize_erasing_regions` instead


thread 'rustc' (859947) panicked at /rustc-dev/621d76794c76fc21c0a6151fbc090120e0230a91/compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:171:13:
Box<dyn Any>
stack backtrace:
   0:     0x7f3a4c433fd3 - <<std[287527946f71f0bc]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[7477a31a1a34cc49]::fmt::Display>::fmt
   1:     0x7f3a4ca0e2c8 - core[7477a31a1a34cc49]::fmt::write
   2:     0x7f3a4c44a9c6 - <std[287527946f71f0bc]::sys::stdio::unix::Stderr as std[287527946f71f0bc]::io::Write>::write_fmt
   3:     0x7f3a4c40a048 - std[287527946f71f0bc]::panicking::default_hook::{closure#0}
   4:     0x7f3a4c427703 - std[287527946f71f0bc]::panicking::default_hook
   5:     0x7f3a4b3fbb8a - std[287527946f71f0bc]::panicking::update_hook::<alloc[979041e9952e771b]::boxed::Box<rustc_driver_impl[517260a07841a630]::install_ice_hook::{closure#1}>>::{closure#0}
   6:     0x7f3a4c4279e2 - std[287527946f71f0bc]::panicking::panic_with_hook
   7:     0x7f3a4b438bc1 - std[287527946f71f0bc]::panicking::begin_panic::<rustc_errors[26c9ea40265c581b]::ExplicitBug>::{closure#0}
   8:     0x7f3a4b428fe6 - std[287527946f71f0bc]::sys::backtrace::__rust_end_short_backtrace::<std[287527946f71f0bc]::panicking::begin_panic<rustc_errors[26c9ea40265c581b]::ExplicitBug>::{closure#0}, !>
   9:     0x7f3a4b4264b9 - std[287527946f71f0bc]::panicking::begin_panic::<rustc_errors[26c9ea40265c581b]::ExplicitBug>
  10:     0x7f3a4b456901 - <rustc_errors[26c9ea40265c581b]::diagnostic::BugAbort as rustc_errors[26c9ea40265c581b]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  11:     0x7f3a4ba074f9 - rustc_middle[725063e074f29df]::util::bug::opt_span_bug_fmt::<rustc_span[851f35e07e3c2dd4]::span_encoding::Span>::{closure#0}
  12:     0x7f3a4ba07682 - rustc_middle[725063e074f29df]::ty::context::tls::with_opt::<rustc_middle[725063e074f29df]::util::bug::opt_span_bug_fmt<rustc_span[851f35e07e3c2dd4]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  13:     0x7f3a4b9f8cab - rustc_middle[725063e074f29df]::ty::context::tls::with_context_opt::<rustc_middle[725063e074f29df]::ty::context::tls::with_opt<rustc_middle[725063e074f29df]::util::bug::opt_span_bug_fmt<rustc_span[851f35e07e3c2dd4]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  14:     0x7f3a48e91cc4 - rustc_middle[725063e074f29df]::util::bug::bug_fmt
  15:     0x7f3a4cc5bf74 - <rustc_middle[725063e074f29df]::ty::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder as rustc_type_ir[b93cf349b3a4f34d]::fold::TypeFolder<rustc_middle[725063e074f29df]::ty::context::TyCtxt>>::fold_ty
  16:     0x7f3a4d5bfa8d - rustc_mir_transform[f63ee9052e691c]::validate::validate_types
  17:     0x7f3a4d5b4946 - <rustc_mir_transform[f63ee9052e691c]::validate::Validator as rustc_mir_transform[f63ee9052e691c]::pass_manager::MirPass>::run_pass
  18:     0x7f3a4a15d7a5 - rustc_mir_transform[f63ee9052e691c]::pass_manager::validate_body
  19:     0x7f3a4ca0b494 - rustc_mir_transform[f63ee9052e691c]::run_analysis_to_runtime_passes
  20:     0x7f3a4d7a9e80 - rustc_mir_transform[f63ee9052e691c]::mir_drops_elaborated_and_const_checked
  21:     0x7f3a4d7a9829 - rustc_query_impl[f20b8284200e680a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[f20b8284200e680a]::query_impl::mir_drops_elaborated_and_const_checked::dynamic_query::{closure#2}::{closure#0}, rustc_middle[725063e074f29df]::query::erase::Erased<[u8; 8usize]>>
  22:     0x7f3a4cb5522a - rustc_query_system[b7e73caa2c2ad9a]::query::plumbing::try_execute_query::<rustc_query_impl[f20b8284200e680a]::DynamicConfig<rustc_data_structures[e0d8483206daafa2]::vec_cache::VecCache<rustc_span[851f35e07e3c2dd4]::def_id::LocalDefId, rustc_middle[725063e074f29df]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[b7e73caa2c2ad9a]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[f20b8284200e680a]::plumbing::QueryCtxt, false>
  23:     0x7f3a4cb548cd - rustc_query_impl[f20b8284200e680a]::query_impl::mir_drops_elaborated_and_const_checked::get_query_non_incr::__rust_end_short_backtrace
  24:     0x7f3a4cb4c4ff - <rustc_middle[725063e074f29df]::ty::context::TyCtxt>::par_hir_body_owners::<rustc_interface[5c48368f5debe80d]::passes::run_required_analyses::{closure#1}::{closure#0}>::{closure#0}
  25:     0x7f3a4cb49c0a - rustc_interface[5c48368f5debe80d]::passes::analysis
  26:     0x7f3a4cb49035 - rustc_query_impl[f20b8284200e680a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[f20b8284200e680a]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[725063e074f29df]::query::erase::Erased<[u8; 0usize]>>
  27:     0x7f3a4dba4be3 - rustc_query_system[b7e73caa2c2ad9a]::query::plumbing::try_execute_query::<rustc_query_impl[f20b8284200e680a]::DynamicConfig<rustc_query_system[b7e73caa2c2ad9a]::query::caches::SingleCache<rustc_middle[725063e074f29df]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[f20b8284200e680a]::plumbing::QueryCtxt, false>
  28:     0x7f3a4dba49ce - rustc_query_impl[f20b8284200e680a]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  29:     0x7f3a4dd82c11 - <rustc_interface[5c48368f5debe80d]::passes::create_and_enter_global_ctxt<core[7477a31a1a34cc49]::option::Option<rustc_interface[5c48368f5debe80d]::queries::Linker>, rustc_driver_impl[517260a07841a630]::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core[7477a31a1a34cc49]::ops::function::FnOnce<(&rustc_session[eb79e6d3104f29ae]::session::Session, rustc_middle[725063e074f29df]::ty::context::CurrentGcx, alloc[979041e9952e771b]::sync::Arc<rustc_data_structures[e0d8483206daafa2]::jobserver::Proxy>, &std[287527946f71f0bc]::sync::once_lock::OnceLock<rustc_middle[725063e074f29df]::ty::context::GlobalCtxt>, &rustc_data_structures[e0d8483206daafa2]::sync::worker_local::WorkerLocal<rustc_middle[725063e074f29df]::arena::Arena>, &rustc_data_structures[e0d8483206daafa2]::sync::worker_local::WorkerLocal<rustc_hir[7eac7792dedc1861]::Arena>, rustc_driver_impl[517260a07841a630]::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
  30:     0x7f3a4dbf5d34 - rustc_interface[5c48368f5debe80d]::interface::run_compiler::<(), rustc_driver_impl[517260a07841a630]::run_compiler::{closure#0}>::{closure#1}
  31:     0x7f3a4db5aa3a - std[287527946f71f0bc]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[5c48368f5debe80d]::util::run_in_thread_with_globals<rustc_interface[5c48368f5debe80d]::util::run_in_thread_pool_with_globals<rustc_interface[5c48368f5debe80d]::interface::run_compiler<(), rustc_driver_impl[517260a07841a630]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  32:     0x7f3a4db5a7fe - <std[287527946f71f0bc]::thread::lifecycle::spawn_unchecked<rustc_interface[5c48368f5debe80d]::util::run_in_thread_with_globals<rustc_interface[5c48368f5debe80d]::util::run_in_thread_pool_with_globals<rustc_interface[5c48368f5debe80d]::interface::run_compiler<(), rustc_driver_impl[517260a07841a630]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[7477a31a1a34cc49]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  33:     0x7f3a4db5c5c4 - <std[287527946f71f0bc]::sys::thread::unix::Thread>::new::thread_start
  34:     0x7f3a4749698b - <unknown>
  35:     0x7f3a4751a9cc - <unknown>
  36:                0x0 - <unknown>

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 make sure that you have updated to the latest nightly

note: rustc 1.95.0-nightly (621d76794 2026-01-18) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z validate-mir -Z next-solver=globally -Z dump-mir-dir=dir

query stack during panic:
#0 [mir_drops_elaborated_and_const_checked] elaborating drops for `foo`
#1 [analysis] running analysis passes on crate `mvce`
end of query stack
error: internal compiler error: /rustc-dev/621d76794c76fc21c0a6151fbc090120e0230a91/compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:171:13: Failed to normalize Alias(Opaque, AliasTy { args: [], def_id: DefId(0:5 ~ mvce[a621]::foo::{opaque#0}), .. }) in typing_env=TypingEnv { typing_mode: PostAnalysis, param_env: ParamEnv { caller_bounds: [] } }, maybe try to call `try_normalize_erasing_regions` instead


thread 'rustc' (859947) panicked at /rustc-dev/621d76794c76fc21c0a6151fbc090120e0230a91/compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:171:13:
Box<dyn Any>
stack backtrace:
   0:     0x7f3a4c433fd3 - <<std[287527946f71f0bc]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[7477a31a1a34cc49]::fmt::Display>::fmt
   1:     0x7f3a4ca0e2c8 - core[7477a31a1a34cc49]::fmt::write
   2:     0x7f3a4c44a9c6 - <std[287527946f71f0bc]::sys::stdio::unix::Stderr as std[287527946f71f0bc]::io::Write>::write_fmt
   3:     0x7f3a4c40a048 - std[287527946f71f0bc]::panicking::default_hook::{closure#0}
   4:     0x7f3a4c427703 - std[287527946f71f0bc]::panicking::default_hook
   5:     0x7f3a4b3fbb8a - std[287527946f71f0bc]::panicking::update_hook::<alloc[979041e9952e771b]::boxed::Box<rustc_driver_impl[517260a07841a630]::install_ice_hook::{closure#1}>>::{closure#0}
   6:     0x7f3a4c4279e2 - std[287527946f71f0bc]::panicking::panic_with_hook
   7:     0x7f3a4b438bc1 - std[287527946f71f0bc]::panicking::begin_panic::<rustc_errors[26c9ea40265c581b]::ExplicitBug>::{closure#0}
   8:     0x7f3a4b428fe6 - std[287527946f71f0bc]::sys::backtrace::__rust_end_short_backtrace::<std[287527946f71f0bc]::panicking::begin_panic<rustc_errors[26c9ea40265c581b]::ExplicitBug>::{closure#0}, !>
   9:     0x7f3a4b4264b9 - std[287527946f71f0bc]::panicking::begin_panic::<rustc_errors[26c9ea40265c581b]::ExplicitBug>
  10:     0x7f3a4b456901 - <rustc_errors[26c9ea40265c581b]::diagnostic::BugAbort as rustc_errors[26c9ea40265c581b]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  11:     0x7f3a4ba074f9 - rustc_middle[725063e074f29df]::util::bug::opt_span_bug_fmt::<rustc_span[851f35e07e3c2dd4]::span_encoding::Span>::{closure#0}
  12:     0x7f3a4ba07682 - rustc_middle[725063e074f29df]::ty::context::tls::with_opt::<rustc_middle[725063e074f29df]::util::bug::opt_span_bug_fmt<rustc_span[851f35e07e3c2dd4]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  13:     0x7f3a4b9f8cab - rustc_middle[725063e074f29df]::ty::context::tls::with_context_opt::<rustc_middle[725063e074f29df]::ty::context::tls::with_opt<rustc_middle[725063e074f29df]::util::bug::opt_span_bug_fmt<rustc_span[851f35e07e3c2dd4]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  14:     0x7f3a48e91cc4 - rustc_middle[725063e074f29df]::util::bug::bug_fmt
  15:     0x7f3a4cc5bf74 - <rustc_middle[725063e074f29df]::ty::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder as rustc_type_ir[b93cf349b3a4f34d]::fold::TypeFolder<rustc_middle[725063e074f29df]::ty::context::TyCtxt>>::fold_ty
  16:     0x7f3a4d5bfa8d - rustc_mir_transform[f63ee9052e691c]::validate::validate_types
  17:     0x7f3a4d5b4946 - <rustc_mir_transform[f63ee9052e691c]::validate::Validator as rustc_mir_transform[f63ee9052e691c]::pass_manager::MirPass>::run_pass
  18:     0x7f3a4a15d7a5 - rustc_mir_transform[f63ee9052e691c]::pass_manager::validate_body
  19:     0x7f3a4ca0b494 - rustc_mir_transform[f63ee9052e691c]::run_analysis_to_runtime_passes
  20:     0x7f3a4d7a9e80 - rustc_mir_transform[f63ee9052e691c]::mir_drops_elaborated_and_const_checked
  21:     0x7f3a4d7a9829 - rustc_query_impl[f20b8284200e680a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[f20b8284200e680a]::query_impl::mir_drops_elaborated_and_const_checked::dynamic_query::{closure#2}::{closure#0}, rustc_middle[725063e074f29df]::query::erase::Erased<[u8; 8usize]>>
  22:     0x7f3a4cb5522a - rustc_query_system[b7e73caa2c2ad9a]::query::plumbing::try_execute_query::<rustc_query_impl[f20b8284200e680a]::DynamicConfig<rustc_data_structures[e0d8483206daafa2]::vec_cache::VecCache<rustc_span[851f35e07e3c2dd4]::def_id::LocalDefId, rustc_middle[725063e074f29df]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[b7e73caa2c2ad9a]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[f20b8284200e680a]::plumbing::QueryCtxt, false>
  23:     0x7f3a4cb548cd - rustc_query_impl[f20b8284200e680a]::query_impl::mir_drops_elaborated_and_const_checked::get_query_non_incr::__rust_end_short_backtrace
  24:     0x7f3a4cb4c4ff - <rustc_middle[725063e074f29df]::ty::context::TyCtxt>::par_hir_body_owners::<rustc_interface[5c48368f5debe80d]::passes::run_required_analyses::{closure#1}::{closure#0}>::{closure#0}
  25:     0x7f3a4cb49c0a - rustc_interface[5c48368f5debe80d]::passes::analysis
  26:     0x7f3a4cb49035 - rustc_query_impl[f20b8284200e680a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[f20b8284200e680a]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[725063e074f29df]::query::erase::Erased<[u8; 0usize]>>
  27:     0x7f3a4dba4be3 - rustc_query_system[b7e73caa2c2ad9a]::query::plumbing::try_execute_query::<rustc_query_impl[f20b8284200e680a]::DynamicConfig<rustc_query_system[b7e73caa2c2ad9a]::query::caches::SingleCache<rustc_middle[725063e074f29df]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[f20b8284200e680a]::plumbing::QueryCtxt, false>
  28:     0x7f3a4dba49ce - rustc_query_impl[f20b8284200e680a]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  29:     0x7f3a4dd82c11 - <rustc_interface[5c48368f5debe80d]::passes::create_and_enter_global_ctxt<core[7477a31a1a34cc49]::option::Option<rustc_interface[5c48368f5debe80d]::queries::Linker>, rustc_driver_impl[517260a07841a630]::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core[7477a31a1a34cc49]::ops::function::FnOnce<(&rustc_session[eb79e6d3104f29ae]::session::Session, rustc_middle[725063e074f29df]::ty::context::CurrentGcx, alloc[979041e9952e771b]::sync::Arc<rustc_data_structures[e0d8483206daafa2]::jobserver::Proxy>, &std[287527946f71f0bc]::sync::once_lock::OnceLock<rustc_middle[725063e074f29df]::ty::context::GlobalCtxt>, &rustc_data_structures[e0d8483206daafa2]::sync::worker_local::WorkerLocal<rustc_middle[725063e074f29df]::arena::Arena>, &rustc_data_structures[e0d8483206daafa2]::sync::worker_local::WorkerLocal<rustc_hir[7eac7792dedc1861]::Arena>, rustc_driver_impl[517260a07841a630]::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
  30:     0x7f3a4dbf5d34 - rustc_interface[5c48368f5debe80d]::interface::run_compiler::<(), rustc_driver_impl[517260a07841a630]::run_compiler::{closure#0}>::{closure#1}
  31:     0x7f3a4db5aa3a - std[287527946f71f0bc]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[5c48368f5debe80d]::util::run_in_thread_with_globals<rustc_interface[5c48368f5debe80d]::util::run_in_thread_pool_with_globals<rustc_interface[5c48368f5debe80d]::interface::run_compiler<(), rustc_driver_impl[517260a07841a630]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  32:     0x7f3a4db5a7fe - <std[287527946f71f0bc]::thread::lifecycle::spawn_unchecked<rustc_interface[5c48368f5debe80d]::util::run_in_thread_with_globals<rustc_interface[5c48368f5debe80d]::util::run_in_thread_pool_with_globals<rustc_interface[5c48368f5debe80d]::interface::run_compiler<(), rustc_driver_impl[517260a07841a630]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[7477a31a1a34cc49]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  33:     0x7f3a4db5c5c4 - <std[287527946f71f0bc]::sys::thread::unix::Thread>::new::thread_start
  34:     0x7f3a4749698b - <unknown>
  35:     0x7f3a4751a9cc - <unknown>
  36:                0x0 - <unknown>

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 make sure that you have updated to the latest nightly

note: rustc 1.95.0-nightly (621d76794 2026-01-18) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z validate-mir -Z next-solver=globally -Z dump-mir-dir=dir

query stack during panic:
#0 [mir_drops_elaborated_and_const_checked] elaborating drops for `bar`
#1 [analysis] running analysis passes on crate `mvce`
end of query stack
error: aborting due to 5 previous errors

Some errors have detailed explanations: E0601, E0720.
For more information about an error, try `rustc --explain E0601`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    -Zvalidate-mirUnstable option: MIR validationC-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.WG-trait-system-refactorThe Rustc Trait System Refactor Initiative (-Znext-solver)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions