Repository navigation
Closed as duplicate
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
The nalgebra crate version 0.29.0 fails to compile with the nightly compiler (v1.96.0). This is not our crate/code, but our code depends on this one, and the tests on GitHub run with the nightly compiler.
Code
Cargo.toml:
[package]
name = "nightly_compiler_bug"
version = "0.1.0"
edition = "2021"
description = ""
rust-version = "1.88.0"
[dependencies]
nalgebra = "0.29.0"
Command:
cargo +nightly test
Meta
rustc +nightly --version --verbose:
rustc 1.96.0-nightly (f66622c7e 2026-03-23)
binary: rustc
commit-hash: f66622c7eca7fc48ccc4dac848ff911b09a4d566
commit-date: 2026-03-23
host: x86_64-apple-darwin
release: 1.96.0-nightly
LLVM version: 22.1.0
Error output
#0 [specialization_graph_of] building specialization graph of trait `core::convert::From`
#1 [coherent_trait] coherence checking all impls of trait `core::convert::From`
#2 [check_well_formed] checking that `base::conversion::<impl at /Users/pece/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/nalgebra-0.29.0/src/base/conversion.rs:113:1: 113:63>` is well-formed
#3 [check_type_wf] checking that types are well-formed
#4 [analysis] running analysis passes on crate `nalgebra`
end of query stack
error: could not compile `nalgebra` (lib)
Backtrace
thread 'rustc' (9217918) panicked at /rustc-dev/f66622c7eca7fc48ccc4dac848ff911b09a4d566/compiler/rustc_infer/src/infer/relate/generalize.rs:294:44:
called `Result::unwrap_err()` on an `Ok` value: base::array_storage::ArrayStorage<base::matrix::Matrix<?20t, base::dimension::Const<?0c>, base::dimension::Const<1_usize>, ?21t>, ?0c, 1_usize>
stack backtrace:
0: __rustc::rust_begin_unwind
1: core::panicking::panic_fmt
2: core::result::unwrap_failed
3: <rustc_infer::infer::InferCtxt>::generalize::<rustc_middle::ty::Ty, rustc_type_ir::ty_kind::TyVid>
4: <rustc_infer::infer::InferCtxt>::instantiate_ty_var::<rustc_type_ir::relate::solver_relating::SolverRelating<rustc_infer::infer::InferCtxt, rustc_middle::ty::context::TyCtxt>>
5: <rustc_type_ir::relate::solver_relating::SolverRelating<rustc_infer::infer::InferCtxt, rustc_middle::ty::context::TyCtxt> as rustc_type_ir::relate::TypeRelation<rustc_middle::ty::context::TyCtxt>>::tys
6: <rustc_middle::ty::generic_args::GenericArg as rustc_type_ir::relate::Relate<rustc_middle::ty::context::TyCtxt>>::relate::<rustc_type_ir::relate::solver_relating::SolverRelating<rustc_infer::infer::InferCtxt, rustc_middle::ty::context::TyCtxt>>
7: <core::result::Result<rustc_middle::ty::generic_args::GenericArg, rustc_type_ir::error::TypeError<rustc_middle::ty::context::TyCtxt>> as rustc_type_ir::interner::CollectAndApply<rustc_middle::ty::generic_args::GenericArg, &rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg>>>::collect_and_apply::<core::iter::adapters::map::Map<core::iter::adapters::zip::Zip<core::iter::adapters::copied::Copied<core::slice::iter::Iter<rustc_middle::ty::generic_args::GenericArg>>, core::iter::adapters::copied::Copied<core::slice::iter::Iter<rustc_middle::ty::generic_args::GenericArg>>>, rustc_type_ir::relate::relate_args_invariantly<rustc_middle::ty::context::TyCtxt, rustc_type_ir::relate::solver_relating::SolverRelating<rustc_infer::infer::InferCtxt, rustc_middle::ty::context::TyCtxt>>::{closure#0}>, <rustc_middle::ty::context::TyCtxt>::mk_args_from_iter<core::iter::adapters::map::Map<core::iter::adapters::zip::Zip<core::iter::adapters::copied::Copied<core::slice::iter::Iter<rustc_middle::ty::generic_args::GenericArg>>, core::iter::adapters::copied::Copied<core::slice::iter::Iter<rustc_middle::ty::generic_args::GenericArg>>>, rustc_type_ir::relate::relate_args_invariantly<rustc_middle::ty::context::TyCtxt, rustc_type_ir::relate::solver_relating::SolverRelating<rustc_infer::infer::InferCtxt, rustc_middle::ty::context::TyCtxt>>::{closure#0}>, core::result::Result<rustc_middle::ty::generic_args::GenericArg, rustc_type_ir::error::TypeError<rustc_middle::ty::context::TyCtxt>>>::{closure#0}>
8: <rustc_type_ir::relate::solver_relating::SolverRelating<rustc_infer::infer::InferCtxt, rustc_middle::ty::context::TyCtxt> as rustc_type_ir::relate::TypeRelation<rustc_middle::ty::context::TyCtxt>>::relate_ty_args::<rustc_type_ir::relate::structurally_relate_tys<rustc_middle::ty::context::TyCtxt, rustc_type_ir::relate::solver_relating::SolverRelating<rustc_infer::infer::InferCtxt, rustc_middle::ty::context::TyCtxt>>::{closure#0}::{closure#0}>
9: <rustc_type_ir::relate::solver_relating::SolverRelating<rustc_infer::infer::InferCtxt, rustc_middle::ty::context::TyCtxt> as rustc_type_ir::relate::TypeRelation<rustc_middle::ty::context::TyCtxt>>::tys
10: <rustc_infer::infer::InferCtxt>::instantiate_ty_var::<rustc_type_ir::relate::solver_relating::SolverRelating<rustc_infer::infer::InferCtxt, rustc_middle::ty::context::TyCtxt>>
11: <rustc_type_ir::relate::solver_relating::SolverRelating<rustc_infer::infer::InferCtxt, rustc_middle::ty::context::TyCtxt> as rustc_type_ir::relate::TypeRelation<rustc_middle::ty::context::TyCtxt>>::tys
12: <rustc_type_ir::relate::solver_relating::SolverRelating<rustc_infer::infer::InferCtxt, rustc_middle::ty::context::TyCtxt> as rustc_type_ir::relate::TypeRelation<rustc_middle::ty::context::TyCtxt>>::tys
13: <rustc_middle::ty::generic_args::GenericArg as rustc_type_ir::relate::Relate<rustc_middle::ty::context::TyCtxt>>::relate::<rustc_type_ir::relate::solver_relating::SolverRelating<rustc_infer::infer::InferCtxt, rustc_middle::ty::context::TyCtxt>>
14: <core::result::Result<rustc_middle::ty::generic_args::GenericArg, rustc_type_ir::error::TypeError<rustc_middle::ty::context::TyCtxt>> as rustc_type_ir::interner::CollectAndApply<rustc_middle::ty::generic_args::GenericArg, &rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg>>>::collect_and_apply::<core::iter::adapters::map::Map<core::iter::adapters::zip::Zip<core::iter::adapters::copied::Copied<core::slice::iter::Iter<rustc_middle::ty::generic_args::GenericArg>>, core::iter::adapters::copied::Copied<core::slice::iter::Iter<rustc_middle::ty::generic_args::GenericArg>>>, rustc_type_ir::relate::relate_args_invariantly<rustc_middle::ty::context::TyCtxt, rustc_type_ir::relate::solver_relating::SolverRelating<rustc_infer::infer::InferCtxt, rustc_middle::ty::context::TyCtxt>>::{closure#0}>, <rustc_middle::ty::context::TyCtxt>::mk_args_from_iter<core::iter::adapters::map::Map<core::iter::adapters::zip::Zip<core::iter::adapters::copied::Copied<core::slice::iter::Iter<rustc_middle::ty::generic_args::GenericArg>>, core::iter::adapters::copied::Copied<core::slice::iter::Iter<rustc_middle::ty::generic_args::GenericArg>>>, rustc_type_ir::relate::relate_args_invariantly<rustc_middle::ty::context::TyCtxt, rustc_type_ir::relate::solver_relating::SolverRelating<rustc_infer::infer::InferCtxt, rustc_middle::ty::context::TyCtxt>>::{closure#0}>, core::result::Result<rustc_middle::ty::generic_args::GenericArg, rustc_type_ir::error::TypeError<rustc_middle::ty::context::TyCtxt>>>::{closure#0}>
15: <rustc_infer::infer::InferCtxt as rustc_type_ir::relate::solver_relating::RelateExt>::relate::<rustc_type_ir::predicate::ExistentialTraitRef<rustc_middle::ty::context::TyCtxt>>
16: <rustc_infer::infer::at::At>::eq_trace::<rustc_type_ir::predicate::TraitRef<rustc_middle::ty::context::TyCtxt>>
17: rustc_trait_selection::traits::coherence::equate_impl_headers
18: rustc_trait_selection::traits::coherence::overlap
19: rustc_trait_selection::traits::coherence::overlapping_impls
20: <rustc_middle::traits::specialization_graph::Children as rustc_trait_selection::traits::specialize::specialization_graph::ChildrenExt>::insert
21: <rustc_middle::traits::specialization_graph::Graph as rustc_trait_selection::traits::specialize::specialization_graph::GraphExt>::insert
22: rustc_trait_selection::traits::specialize::specialization_graph_provider
23: rustc_query_impl::execution::try_execute_query::<rustc_middle::query::caches::DefIdCache<rustc_middle::query::erase::ErasedData<[u8; 8]>>, false>
24: rustc_hir_analysis::coherence::coherent_trait
[... omitted 1 frame ...]
25: rustc_middle::query::inner::query_ensure_result::<rustc_middle::query::caches::DefIdCache<rustc_middle::query::erase::ErasedData<[u8; 1]>>, ()>
26: rustc_hir_analysis::check::check::check_item_type
27: rustc_hir_analysis::check::wfcheck::check_well_formed
[... omitted 1 frame ...]
28: rustc_hir_analysis::check::wfcheck::check_type_wf
[... omitted 1 frame ...]
29: rustc_hir_analysis::check_crate
30: rustc_interface::passes::analysis
31: rustc_query_impl::execution::try_execute_query::<rustc_middle::query::caches::SingleCache<rustc_middle::query::erase::ErasedData<[u8; 0]>>, false>
32: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>
33: 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.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Activity
cyrgani commentedon Mar 25, 2026
Thanks for the report; this is a duplicate of #154244.
Result::unwrap_err()on anOkvalue during specialization graph building #154244