-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-sized_hierarchy`#![feature(sized_hierarchy)]``#![feature(sized_hierarchy)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-lowLow priorityLow priorityT-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.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Description
I tried this code:
Reduction:
trait PointeeSized {
type Undefined;
}
struct T;
impl PointeeSized for T
where
<T as PointeeSized>::Undefined: PointeeSized,
{}
fn main() {}| Release channel | Result |
|---|---|
| Current Stable | error |
| Current Nightly (default solver) | error |
Current Nightly (+ -Znext-solver=globally) |
ICE |
Meta
rustc --version --verbose:
rustc 1.95.0-nightly (a293cc4af 2026-01-30)
binary: rustc
commit-hash: a293cc4af8b26701c42738381c0c6f9d2ba881e0
commit-date: 2026-01-30
host: x86_64-unknown-linux-gnu
release: 1.95.0-nightly
LLVM version: 22.1.0
Backtrace
thread 'rustc' panicked at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_next_trait_solver/src/solve/assembly/mod.rs:550:21:
internal error: entered unreachable code: `PointeeSized` is removed during lowering
stack backtrace:
0: 0x7f854c225b2b - <std[b56300d62699629]::backtrace::Backtrace>::create
1: 0x7f854c225a75 - <std[b56300d62699629]::backtrace::Backtrace>::force_capture
2: 0x7f854b20e06a - std[b56300d62699629]::panicking::update_hook::<alloc[77e06c05b3e1163]::boxed::Box<rustc_driver_impl[306165e0f22ac3b8]::install_ice_hook::{closure#1}>>::{closure#0}
3: 0x7f854c238562 - std[b56300d62699629]::panicking::panic_with_hook
4: 0x7f854c21b05a - std[b56300d62699629]::panicking::panic_handler::{closure#0}
5: 0x7f854c20f599 - std[b56300d62699629]::sys::backtrace::__rust_end_short_backtrace::<std[b56300d62699629]::panicking::panic_handler::{closure#0}, !>
6: 0x7f854c21ca8d - __rustc[dff7bba7b93d99f5]::rust_begin_unwind
7: 0x7f8548ec973c - core[1940e17cfe77f04e]::panicking::panic_fmt
8: 0x7f854d6bbb0f - <rustc_next_trait_solver[9292fa706aa7673a]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[c7f74c517c76c09d]::solve::delegate::SolverDelegate, rustc_middle[4fbddfd8361bbe31]::ty::context::TyCtxt>>::assemble_builtin_impl_candidates::<rustc_type_ir[d34b452a896e10b7]::predicate::TraitPredicate<rustc_middle[4fbddfd8361bbe31]::ty::context::TyCtxt>>
9: 0x7f854d6ad8b3 - <rustc_next_trait_solver[9292fa706aa7673a]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[c7f74c517c76c09d]::solve::delegate::SolverDelegate, rustc_middle[4fbddfd8361bbe31]::ty::context::TyCtxt>>::compute_trait_goal
10: 0x7f854d6a712b - <rustc_next_trait_solver[9292fa706aa7673a]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[c7f74c517c76c09d]::solve::delegate::SolverDelegate> as rustc_type_ir[d34b452a896e10b7]::search_graph::Delegate>::compute_goal::{closure#0}
11: 0x7f854d3826ee - <rustc_next_trait_solver[9292fa706aa7673a]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[c7f74c517c76c09d]::solve::delegate::SolverDelegate, rustc_middle[4fbddfd8361bbe31]::ty::context::TyCtxt>>::evaluate_goal_raw
12: 0x7f854d391cbc - <rustc_trait_selection[c7f74c517c76c09d]::solve::fulfill::FulfillmentCtxt<rustc_infer[a2c09121c28d14ae]::traits::engine::ScrubbedTraitError> as rustc_infer[a2c09121c28d14ae]::traits::engine::TraitEngine<rustc_infer[a2c09121c28d14ae]::traits::engine::ScrubbedTraitError>>::evaluate_obligations_error_on_ambiguity
13: 0x7f854ceb4b4b - <rustc_infer[a2c09121c28d14ae]::infer::InferCtxt as rustc_trait_selection[c7f74c517c76c09d]::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation_no_overflow
14: 0x7f854bfd2a12 - <core[1940e17cfe77f04e]::iter::adapters::flatten::FlattenCompat<_, _> as core[1940e17cfe77f04e]::iter::traits::iterator::Iterator>::try_fold::flatten::<core[1940e17cfe77f04e]::iter::adapters::copied::Copied<core[1940e17cfe77f04e]::slice::iter::Iter<rustc_span[40d3100df278a6ee]::def_id::DefId>>, (), core[1940e17cfe77f04e]::ops::control_flow::ControlFlow<rustc_span[40d3100df278a6ee]::def_id::DefId>, core[1940e17cfe77f04e]::iter::traits::iterator::Iterator::find::check<rustc_span[40d3100df278a6ee]::def_id::DefId, <rustc_trait_selection[c7f74c517c76c09d]::error_reporting::TypeErrCtxt>::check_same_name_different_path::{closure#1}>::{closure#0}>::{closure#0}
15: 0x7f854bfd148c - core[1940e17cfe77f04e]::iter::adapters::map::map_try_fold::<rustc_span[40d3100df278a6ee]::def_id::CrateNum, core[1940e17cfe77f04e]::iter::adapters::copied::Copied<core[1940e17cfe77f04e]::slice::iter::Iter<rustc_span[40d3100df278a6ee]::def_id::DefId>>, (), core[1940e17cfe77f04e]::ops::control_flow::ControlFlow<rustc_span[40d3100df278a6ee]::def_id::DefId>, <rustc_middle[4fbddfd8361bbe31]::ty::context::TyCtxt>::all_traits_including_private::{closure#0}, <core[1940e17cfe77f04e]::iter::adapters::flatten::FlattenCompat<_, _>>::iter_try_fold::flatten<core[1940e17cfe77f04e]::iter::adapters::copied::Copied<core[1940e17cfe77f04e]::slice::iter::Iter<rustc_span[40d3100df278a6ee]::def_id::DefId>>, (), core[1940e17cfe77f04e]::ops::control_flow::ControlFlow<rustc_span[40d3100df278a6ee]::def_id::DefId>, <core[1940e17cfe77f04e]::iter::adapters::flatten::FlattenCompat<_, _> as core[1940e17cfe77f04e]::iter::traits::iterator::Iterator>::try_fold::flatten<core[1940e17cfe77f04e]::iter::adapters::copied::Copied<core[1940e17cfe77f04e]::slice::iter::Iter<rustc_span[40d3100df278a6ee]::def_id::DefId>>, (), core[1940e17cfe77f04e]::ops::control_flow::ControlFlow<rustc_span[40d3100df278a6ee]::def_id::DefId>, core[1940e17cfe77f04e]::iter::traits::iterator::Iterator::find::check<rustc_span[40d3100df278a6ee]::def_id::DefId, <rustc_trait_selection[c7f74c517c76c09d]::error_reporting::TypeErrCtxt>::check_same_name_different_path::{closure#1}>::{closure#0}>::{closure#0}>::{closure#0}>::{closure#0}
16: 0x7f854c0319ff - <rustc_trait_selection[c7f74c517c76c09d]::error_reporting::TypeErrCtxt>::note_different_trait_with_same_name
17: 0x7f854c013011 - <rustc_trait_selection[c7f74c517c76c09d]::error_reporting::TypeErrCtxt>::report_selection_error
18: 0x7f854ab238f7 - <rustc_trait_selection[c7f74c517c76c09d]::error_reporting::TypeErrCtxt>::report_fulfillment_errors
19: 0x7f854d14a819 - rustc_hir_analysis[281f645d6dd33d26]::check::wfcheck::check_impl
20: 0x7f854cf1fd61 - rustc_hir_analysis[281f645d6dd33d26]::check::check::check_item_type
21: 0x7f854cf1c034 - rustc_hir_analysis[281f645d6dd33d26]::check::wfcheck::check_well_formed
22: 0x7f854cf1c015 - rustc_query_impl[de8dc5dcbfafa282]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[de8dc5dcbfafa282]::query_impl::check_well_formed::make_query_vtable::{closure#1}::{closure#0}, rustc_middle[4fbddfd8361bbe31]::query::erase::ErasedData<[u8; 1usize]>>
23: 0x7f854cf1ba33 - rustc_query_system[47e010d69cf1376c]::query::plumbing::try_execute_query::<rustc_query_impl[de8dc5dcbfafa282]::SemiDynamicQueryDispatcher<rustc_data_structures[66bcb0d8d60a0708]::vec_cache::VecCache<rustc_span[40d3100df278a6ee]::def_id::LocalDefId, rustc_middle[4fbddfd8361bbe31]::query::erase::ErasedData<[u8; 1usize]>, rustc_query_system[47e010d69cf1376c]::dep_graph::graph::DepNodeIndex>, false, false, false>, false>
24: 0x7f854cf1b542 - rustc_query_impl[de8dc5dcbfafa282]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
25: 0x7f854cf18cf0 - rustc_hir_analysis[281f645d6dd33d26]::check::wfcheck::check_type_wf
26: 0x7f854cf18bdd - rustc_query_impl[de8dc5dcbfafa282]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[de8dc5dcbfafa282]::query_impl::check_type_wf::make_query_vtable::{closure#1}::{closure#0}, rustc_middle[4fbddfd8361bbe31]::query::erase::ErasedData<[u8; 1usize]>>
27: 0x7f854d96d248 - rustc_query_system[47e010d69cf1376c]::query::plumbing::try_execute_query::<rustc_query_impl[de8dc5dcbfafa282]::SemiDynamicQueryDispatcher<rustc_query_system[47e010d69cf1376c]::query::caches::SingleCache<rustc_middle[4fbddfd8361bbe31]::query::erase::ErasedData<[u8; 1usize]>>, false, false, false>, false>
28: 0x7f854d96cef6 - rustc_query_impl[de8dc5dcbfafa282]::query_impl::check_type_wf::get_query_non_incr::__rust_end_short_backtrace
29: 0x7f854ce3fb56 - rustc_hir_analysis[281f645d6dd33d26]::check_crate
30: 0x7f854c92e11b - rustc_interface[c33df4e5b4e639ae]::passes::analysis
31: 0x7f854c92dd75 - rustc_query_impl[de8dc5dcbfafa282]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[de8dc5dcbfafa282]::query_impl::analysis::make_query_vtable::{closure#1}::{closure#0}, rustc_middle[4fbddfd8361bbe31]::query::erase::ErasedData<[u8; 0usize]>>
32: 0x7f854d96dfe6 - rustc_query_system[47e010d69cf1376c]::query::plumbing::try_execute_query::<rustc_query_impl[de8dc5dcbfafa282]::SemiDynamicQueryDispatcher<rustc_query_system[47e010d69cf1376c]::query::caches::SingleCache<rustc_middle[4fbddfd8361bbe31]::query::erase::ErasedData<[u8; 0usize]>>, false, false, false>, false>
33: 0x7f854d96ddce - rustc_query_impl[de8dc5dcbfafa282]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
34: 0x7f854db06b6c - <rustc_interface[c33df4e5b4e639ae]::passes::create_and_enter_global_ctxt<core[1940e17cfe77f04e]::option::Option<rustc_interface[c33df4e5b4e639ae]::queries::Linker>, rustc_driver_impl[306165e0f22ac3b8]::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core[1940e17cfe77f04e]::ops::function::FnOnce<(&rustc_session[1d337842f56cc0a6]::session::Session, rustc_middle[4fbddfd8361bbe31]::ty::context::CurrentGcx, alloc[77e06c05b3e1163]::sync::Arc<rustc_data_structures[66bcb0d8d60a0708]::jobserver::Proxy>, &std[b56300d62699629]::sync::once_lock::OnceLock<rustc_middle[4fbddfd8361bbe31]::ty::context::GlobalCtxt>, &rustc_data_structures[66bcb0d8d60a0708]::sync::worker_local::WorkerLocal<rustc_middle[4fbddfd8361bbe31]::arena::Arena>, &rustc_data_structures[66bcb0d8d60a0708]::sync::worker_local::WorkerLocal<rustc_hir[5322f89bbdf6d77c]::Arena>, rustc_driver_impl[306165e0f22ac3b8]::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
35: 0x7f854d995748 - rustc_interface[c33df4e5b4e639ae]::interface::run_compiler::<(), rustc_driver_impl[306165e0f22ac3b8]::run_compiler::{closure#0}>::{closure#1}
36: 0x7f854d9d25be - std[b56300d62699629]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[c33df4e5b4e639ae]::util::run_in_thread_with_globals<rustc_interface[c33df4e5b4e639ae]::util::run_in_thread_pool_with_globals<rustc_interface[c33df4e5b4e639ae]::interface::run_compiler<(), rustc_driver_impl[306165e0f22ac3b8]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
37: 0x7f854d9d2ae0 - <std[b56300d62699629]::thread::lifecycle::spawn_unchecked<rustc_interface[c33df4e5b4e639ae]::util::run_in_thread_with_globals<rustc_interface[c33df4e5b4e639ae]::util::run_in_thread_pool_with_globals<rustc_interface[c33df4e5b4e639ae]::interface::run_compiler<(), rustc_driver_impl[306165e0f22ac3b8]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[1940e17cfe77f04e]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
38: 0x7f854d9d396c - <std[b56300d62699629]::sys::thread::unix::Thread>::new::thread_start
39: 0x7f8547294ac3 - start_thread
at ./nptl/pthread_create.c:442:8
40: 0x7f85473268c0 - __GI___clone3
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81:0
41: 0x0 - <unknown>
rustc version: 1.95.0-nightly (a293cc4af 2026-01-30)
platform: x86_64-unknown-linux-gnu
query stack during panic:
#0 [check_well_formed] checking that `<impl at bug.rs:5:1: 7:50>` is well-formed
#1 [check_type_wf] checking that types are well-formed
#2 [analysis] running analysis passes on crate `bug`
end of query stack
@rustbot label +WG-trait-system-refactor +I-ICE +T-compiler +C-bug
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-sized_hierarchy`#![feature(sized_hierarchy)]``#![feature(sized_hierarchy)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-lowLow priorityLow priorityT-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.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Type
Fields
Give feedbackNo fields configured for issues without a type.