- Notifications
You must be signed in to change notification settings - Fork 13.8k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-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.WG-trait-system-refactorThe Rustc Trait System Refactor Initiative (-Znext-solver)The Rustc Trait System Refactor Initiative (-Znext-solver)
Description
auto-reduced (treereduce-rust):
trait ToUnit<'a> { type Unit; } trait Overlap<T> {} type Assoc<'a, T> = <*const T as ToUnit<'a>>::Unit; impl<T> Overlap<T> for T {} impl<T> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T {}
original:
trait ToUnit<'a> { type Unit; } impl<Tail, const KEY_ID: &'static str, const K: &'static str> ToUnit<'a> for *const T {} trait Overlap<T> {} type Assoc<'a, T> = <*const T as ToUnit<'a>>::Unit; impl<T> Overlap<T> for T {} impl<T> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T {}
Version information
rustc 1.78.0-nightly (b79db437d 2024-02-26) binary: rustc commit-hash: b79db437dccd496948bb1819d36ed51598563a98 commit-date: 2024-02-26 host: x86_64-unknown-linux-gnu release: 1.78.0-nightly LLVM version: 18.1.0
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc -Znext-solver=coherence
Program output
error[E0601]: `main` function not found in crate `mvce` --> /tmp/icemaker_global_tempdir.w73y8WqrEt1S/rustc_testrunner_tmpdir_reporting.zzKnocpp6us9/mvce.rs:11:59 | 11 | impl<T> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T {} | ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.w73y8WqrEt1S/rustc_testrunner_tmpdir_reporting.zzKnocpp6us9/mvce.rs` WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:15 ~ mvce[0033]::{impl#1}::'a), 'a) })], def_id: DefId(0:5 ~ mvce[0033]::ToUnit::Unit) } thread 'rustc' panicked at compiler/rustc_trait_selection/src/solve/eval_ctxt/canonical.rs:325:13: assertion failed: obligations.is_empty() stack backtrace: 0: 0x7fd9c498ca06 - std::backtrace_rs::backtrace::libunwind::trace::h7b190557205b1228 at /rustc/b79db437dccd496948bb1819d36ed51598563a98/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5 1: 0x7fd9c498ca06 - std::backtrace_rs::backtrace::trace_unsynchronized::ha6bc38fea97fe887 at /rustc/b79db437dccd496948bb1819d36ed51598563a98/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x7fd9c498ca06 - std::sys_common::backtrace::_print_fmt::h341f97409970e15a at /rustc/b79db437dccd496948bb1819d36ed51598563a98/library/std/src/sys_common/backtrace.rs:68:5 3: 0x7fd9c498ca06 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h657f49f3d1c99d4e at /rustc/b79db437dccd496948bb1819d36ed51598563a98/library/std/src/sys_common/backtrace.rs:44:22 4: 0x7fd9c49dd98c - core::fmt::rt::Argument::fmt::h9b0eb269b915782f at /rustc/b79db437dccd496948bb1819d36ed51598563a98/library/core/src/fmt/rt.rs:142:9 5: 0x7fd9c49dd98c - core::fmt::write::hef4379a992fe4484 at /rustc/b79db437dccd496948bb1819d36ed51598563a98/library/core/src/fmt/mod.rs:1120:17 6: 0x7fd9c49813cf - std::io::Write::write_fmt::h7e33dbf3b1ed000d at /rustc/b79db437dccd496948bb1819d36ed51598563a98/library/std/src/io/mod.rs:1846:15 7: 0x7fd9c498c7b4 - std::sys_common::backtrace::_print::h804cc658c60efb10 at /rustc/b79db437dccd496948bb1819d36ed51598563a98/library/std/src/sys_common/backtrace.rs:47:5 8: 0x7fd9c498c7b4 - std::sys_common::backtrace::print::hd0e6d24a9a3ec77a at /rustc/b79db437dccd496948bb1819d36ed51598563a98/library/std/src/sys_common/backtrace.rs:34:9 9: 0x7fd9c498f4fb - std::panicking::default_hook::{{closure}}::ha6e94f6d57cd41e6 10: 0x7fd9c498f249 - std::panicking::default_hook::h1888ac974370e810 at /rustc/b79db437dccd496948bb1819d36ed51598563a98/library/std/src/panicking.rs:292:9 11: 0x7fd9c78a5f1c - std[20bc6fac038bdf8e]::panicking::update_hook::<alloc[d78268eff55bae8d]::boxed::Box<rustc_driver_impl[de70491f6558020b]::install_ice_hook::{closure#0}>>::{closure#0} 12: 0x7fd9c498fc60 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h28ec70f07c106b4c at /rustc/b79db437dccd496948bb1819d36ed51598563a98/library/alloc/src/boxed.rs:2030:9 13: 0x7fd9c498fc60 - std::panicking::rust_panic_with_hook::h8ec99ac316e2ffcc at /rustc/b79db437dccd496948bb1819d36ed51598563a98/library/std/src/panicking.rs:783:13 14: 0x7fd9c498f969 - std::panicking::begin_panic_handler::{{closure}}::hf8c6fa70a51e025e at /rustc/b79db437dccd496948bb1819d36ed51598563a98/library/std/src/panicking.rs:649:13 15: 0x7fd9c498cee6 - std::sys_common::backtrace::__rust_end_short_backtrace::hde0c258637183d4d at /rustc/b79db437dccd496948bb1819d36ed51598563a98/library/std/src/sys_common/backtrace.rs:171:18 16: 0x7fd9c498f6d4 - rust_begin_unwind at /rustc/b79db437dccd496948bb1819d36ed51598563a98/library/std/src/panicking.rs:645:5 17: 0x7fd9c49d9ea5 - core::panicking::panic_fmt::h62a99383eeecb2b1 at /rustc/b79db437dccd496948bb1819d36ed51598563a98/library/core/src/panicking.rs:72:14 18: 0x7fd9c49d9f63 - core::panicking::panic::hbd9c786d92b9fc84 at /rustc/b79db437dccd496948bb1819d36ed51598563a98/library/core/src/panicking.rs:144:5 19: 0x7fd9c838d72b - <rustc_trait_selection[d07648c186cf7da6]::solve::eval_ctxt::EvalCtxt>::unify_query_var_values 20: 0x7fd9c836fde9 - <rustc_trait_selection[d07648c186cf7da6]::traits::coherence::AmbiguityCausesVisitor as rustc_trait_selection[d07648c186cf7da6]::solve::inspect::analyse::ProofTreeVisitor>::visit_goal 21: 0x7fd9c90b09df - rustc_trait_selection[d07648c186cf7da6]::traits::coherence::overlap 22: 0x7fd9c964d369 - <rustc_middle[672f916162da190d]::traits::specialization_graph::Children as rustc_trait_selection[d07648c186cf7da6]::traits::specialize::specialization_graph::ChildrenExt>::insert 23: 0x7fd9c964c23d - <rustc_middle[672f916162da190d]::traits::specialization_graph::Graph as rustc_trait_selection[d07648c186cf7da6]::traits::specialize::specialization_graph::GraphExt>::insert 24: 0x7fd9c964f576 - rustc_trait_selection[d07648c186cf7da6]::traits::specialize::specialization_graph_provider 25: 0x7fd9c964f00d - rustc_query_impl[43cff2b1472d6b64]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[43cff2b1472d6b64]::query_impl::specialization_graph_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[672f916162da190d]::query::erase::Erased<[u8; 8usize]>> 26: 0x7fd9c8c8c320 - rustc_query_system[825c829a5a5ee210]::query::plumbing::try_execute_query::<rustc_query_impl[43cff2b1472d6b64]::DynamicConfig<rustc_query_system[825c829a5a5ee210]::query::caches::DefIdCache<rustc_middle[672f916162da190d]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[43cff2b1472d6b64]::plumbing::QueryCtxt, false> 27: 0x7fd9c9222774 - rustc_query_impl[43cff2b1472d6b64]::query_impl::specialization_graph_of::get_query_non_incr::__rust_end_short_backtrace 28: 0x7fd9c9222c8a - rustc_hir_analysis[48e334b2e707fc63]::coherence::coherent_trait 29: 0x7fd9c9222a49 - rustc_query_impl[43cff2b1472d6b64]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[43cff2b1472d6b64]::query_impl::coherent_trait::dynamic_query::{closure#2}::{closure#0}, rustc_middle[672f916162da190d]::query::erase::Erased<[u8; 1usize]>> 30: 0x7fd9c8cc77d6 - rustc_query_system[825c829a5a5ee210]::query::plumbing::try_execute_query::<rustc_query_impl[43cff2b1472d6b64]::DynamicConfig<rustc_query_system[825c829a5a5ee210]::query::caches::DefIdCache<rustc_middle[672f916162da190d]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[43cff2b1472d6b64]::plumbing::QueryCtxt, false> 31: 0x7fd9c92f5025 - rustc_query_impl[43cff2b1472d6b64]::query_impl::coherent_trait::get_query_non_incr::__rust_end_short_backtrace 32: 0x7fd9c94e4b7a - rustc_hir_analysis[48e334b2e707fc63]::check_crate 33: 0x7fd9c98010ef - rustc_interface[e4e5f0991526f151]::passes::analysis 34: 0x7fd9c9800d59 - rustc_query_impl[43cff2b1472d6b64]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[43cff2b1472d6b64]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[672f916162da190d]::query::erase::Erased<[u8; 1usize]>> 35: 0x7fd9c9932ba5 - rustc_query_system[825c829a5a5ee210]::query::plumbing::try_execute_query::<rustc_query_impl[43cff2b1472d6b64]::DynamicConfig<rustc_query_system[825c829a5a5ee210]::query::caches::SingleCache<rustc_middle[672f916162da190d]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[43cff2b1472d6b64]::plumbing::QueryCtxt, false> 36: 0x7fd9c9932909 - rustc_query_impl[43cff2b1472d6b64]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace 37: 0x7fd9c993a496 - rustc_interface[e4e5f0991526f151]::interface::run_compiler::<core[582474e281ef7080]::result::Result<(), rustc_span[d964d3092beb82ea]::ErrorGuaranteed>, rustc_driver_impl[de70491f6558020b]::run_compiler::{closure#0}>::{closure#0} 38: 0x7fd9c9be6045 - std[20bc6fac038bdf8e]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[e4e5f0991526f151]::util::run_in_thread_with_globals<rustc_interface[e4e5f0991526f151]::util::run_in_thread_pool_with_globals<rustc_interface[e4e5f0991526f151]::interface::run_compiler<core[582474e281ef7080]::result::Result<(), rustc_span[d964d3092beb82ea]::ErrorGuaranteed>, rustc_driver_impl[de70491f6558020b]::run_compiler::{closure#0}>::{closure#0}, core[582474e281ef7080]::result::Result<(), rustc_span[d964d3092beb82ea]::ErrorGuaranteed>>::{closure#0}, core[582474e281ef7080]::result::Result<(), rustc_span[d964d3092beb82ea]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[582474e281ef7080]::result::Result<(), rustc_span[d964d3092beb82ea]::ErrorGuaranteed>> 39: 0x7fd9c9be5e72 - <<std[20bc6fac038bdf8e]::thread::Builder>::spawn_unchecked_<rustc_interface[e4e5f0991526f151]::util::run_in_thread_with_globals<rustc_interface[e4e5f0991526f151]::util::run_in_thread_pool_with_globals<rustc_interface[e4e5f0991526f151]::interface::run_compiler<core[582474e281ef7080]::result::Result<(), rustc_span[d964d3092beb82ea]::ErrorGuaranteed>, rustc_driver_impl[de70491f6558020b]::run_compiler::{closure#0}>::{closure#0}, core[582474e281ef7080]::result::Result<(), rustc_span[d964d3092beb82ea]::ErrorGuaranteed>>::{closure#0}, core[582474e281ef7080]::result::Result<(), rustc_span[d964d3092beb82ea]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[582474e281ef7080]::result::Result<(), rustc_span[d964d3092beb82ea]::ErrorGuaranteed>>::{closure#1} as core[582474e281ef7080]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 40: 0x7fd9c4999635 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hb7065bf16da10381 at /rustc/b79db437dccd496948bb1819d36ed51598563a98/library/alloc/src/boxed.rs:2016:9 41: 0x7fd9c4999635 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h3918eebecb806807 at /rustc/b79db437dccd496948bb1819d36ed51598563a98/library/alloc/src/boxed.rs:2016:9 42: 0x7fd9c4999635 - std::sys::pal::unix::thread::Thread::new::thread_start::h9785a57a6fc9c198 at /rustc/b79db437dccd496948bb1819d36ed51598563a98/library/std/src/sys/pal/unix/thread.rs:108:17 43: 0x7fd9c474b55a - <unknown> 44: 0x7fd9c47c8a3c - <unknown> 45: 0x0 - <unknown> error: the compiler unexpectedly panicked. this is a bug. 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.78.0-nightly (b79db437d 2024-02-26) running on x86_64-unknown-linux-gnu note: compiler flags: -Z next-solver=coherence -Z dump-mir-dir=dir query stack during panic: #0 [specialization_graph_of] building specialization graph of trait `Overlap` #1 [coherent_trait] coherence checking all impls of trait `Overlap` #2 [analysis] running analysis passes on this crate end of query stack error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0601`.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-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.WG-trait-system-refactorThe Rustc Trait System Refactor Initiative (-Znext-solver)The Rustc Trait System Refactor Initiative (-Znext-solver)