thread 'rustc' (9080132) panicked at /rustc-dev/b90dc1e597db0bbc0cab0eccb39747b1a9d7e607/compiler/rustc_middle/src/ty/sty.rs:1740:86:
Box<dyn Any>
stack backtrace:
0: std::panicking::begin_panic::<rustc_errors::ExplicitBug>
1: <rustc_errors::diagnostic::BugAbort as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
2: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>::{closure#0}
3: rustc_middle::ty::context::tls::with_opt::<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}
4: rustc_middle::ty::context::tls::with_context_opt::<rustc_middle::ty::context::tls::with_opt<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
5: rustc_middle::util::bug::bug_fmt
6: rustc_trait_selection::traits::project::confirm_builtin_candidate
7: rustc_trait_selection::traits::project::opt_normalize_projection_term
8: rustc_trait_selection::traits::project::normalize_projection_term
9: rustc_traits::normalize_projection_ty::normalize_canonicalized_projection
10: rustc_query_impl::execution::try_execute_query::<rustc_middle::query::caches::DefaultCache<rustc_type_ir::canonical::CanonicalQueryInput<rustc_middle::ty::context::TyCtxt, rustc_middle::ty::ParamEnvAnd<rustc_type_ir::predicate::AliasTerm<rustc_middle::ty::context::TyCtxt>>>, rustc_middle::query::erase::ErasedData<[u8; 8]>>, false>
11: <rustc_trait_selection::traits::query::normalize::QueryNormalizer>::try_fold_free_or_assoc
12: <rustc_trait_selection::traits::query::normalize::QueryNormalizer as rustc_type_ir::fold::FallibleTypeFolder<rustc_middle::ty::context::TyCtxt>>::try_fold_ty
13: <rustc_traits::normalize_erasing_regions::provide::{closure#0} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_middle::ty::PseudoCanonicalInput<rustc_middle::ty::generic_args::GenericArg>)>>::call_once
14: rustc_query_impl::execution::try_execute_query::<rustc_middle::query::caches::DefaultCache<rustc_middle::ty::PseudoCanonicalInput<rustc_middle::ty::generic_args::GenericArg>, rustc_middle::query::erase::ErasedData<[u8; 8]>>, false>
15: <rustc_middle::ty::normalize_erasing_regions::TryNormalizeAfterErasingRegionsFolder>::try_normalize_generic_arg_after_erasing_regions
16: <rustc_middle::ty::context::TyCtxt>::try_normalize_erasing_regions::<rustc_middle::ty::Ty>
17: rustc_ty_utils::layout::layout_of
[... omitted 1 frame ...]
18: rustc_ty_utils::layout::layout_of
[... omitted 1 frame ...]
19: rustc_hir_analysis::check::check::check_item_type
20: rustc_hir_analysis::check::wfcheck::check_well_formed
[... omitted 1 frame ...]
21: rustc_hir_analysis::check::wfcheck::check_type_wf
[... omitted 1 frame ...]
22: rustc_hir_analysis::check_crate
23: rustc_interface::passes::analysis
24: rustc_query_impl::execution::try_execute_query::<rustc_middle::query::caches::SingleCache<rustc_middle::query::erase::ErasedData<[u8; 0]>>, false>
25: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>
26: rustc_interface::interface::run_compiler::<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
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: please attach the file at `/Volumes/T7/workspace/scratch_250918/rustc-ice-2026-03-05T05_18_01-87285.txt` to your bug report
note: rustc 1.96.0-nightly (b90dc1e59 2026-03-04) running on x86_64-apple-darwin
query stack during panic:
#0 [normalize_canonicalized_projection] normalizing `<Foo as core::ptr::metadata::Pointee>::Metadata`
#1 [try_normalize_generic_arg_after_erasing_regions] normalizing `<Foo as core::ptr::metadata::Pointee>::Metadata`
#2 [layout_of] computing layout of `&Foo`
#3 [layout_of] computing layout of `&'static Foo`
#4 [check_well_formed] checking that `FOO2` is well-formed
#5 [check_type_wf] checking that types are well-formed
#6 [analysis] running analysis passes on crate `asdf`
end of query stack
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0275`.
Code
A mutant of
tests/ui/type-alias-impl-trait/bad-transmute-itiat.rsMeta
rustc --version --verbose:Error output
Command:
rustcBacktrace
Regression In
Regression in nightly-2025-07-02Command:
cargo bisect-rustc --start=2025-01-01 --end=2026-03-05 --regress ice --preserve --script rustc -- asdf.rsLog
Notes
ICE location:
compiler/rustc_middle/src/ty/sty.rs Line-1740rust/compiler/rustc_middle/src/ty/sty.rs
Lines 1736 to 1742 in b90dc1e
Duplication Check: