Description
This branch used to compile, and now ICEs. It seems recent change to our negative coherence impl have broken the implementation, causing the compiler to fail. Thanks!
r? @spastorino
Stacktrace
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler\rustc_trait_selection\src\traits\coherence.rs:312:60 stack backtrace: 0: rust_begin_unwind 1: core::panicking::panic_fmt 2: core::panicking::panic 3: rustc_trait_selection::traits::coherence::overlap_within_probe 4: rustc_trait_selection::traits::coherence::overlap_within_probe 5: ::probe_maybe_skip_leak_check::, rustc_trait_selection::traits::coherence::overlap::{closure#0}> 6: rustc_trait_selection::traits::coherence::overlap 7: RINvMs3_NtCsbBF8kn6qBh0_11rustc_infer5inferNtB6_16InferCtxtBuilder5enterbNCINvNtNtCsjf3HF1vxQx1_21rustc_trait_selection6traits9coherence17overlapping_implsNCNvMNtNtCs2iWJnhcUJwZ_12rustc_typeck9coherence22inherent_impls_overlapNtB2y_22InherentOverlapChecke 8: rustc_trait_selection::traits::coherence::overlapping_impls::<::check_for_overlapping_inherent_impls::{closure#0}, ::check_for_overlapping_inherent_impls::{closure#1}, bool> 9: ::visit_item 10: ::visit_all_item_likes:: 11: rustc_typeck::coherence::inherent_impls_overlap::crate_inherent_impls_overlap_check 12: RINvXNtCsf05yCjQpQCP_12rustc_middle9dep_graphNtNtB3_8dep_node7DepKindNtNtCslXmC8lPkVEE_18rustc_query_system9dep_graph7DepKind9with_depsNCINvMs1_NtB17_5graphINtB2i_8DepGraphBH_E14with_task_implNtNtNtB5_2ty7context6TyCtxtuuE0uECs1oIwRMkvWkL_16rustc_query_im 13: >::with_task:: 14: rustc_data_structures::stack::ensure_sufficient_stack::<((), rustc_query_system::dep_graph::graph::DepNodeIndex), rustc_query_system::query::plumbing::execute_job::{closure#3}> 15: as core::default::Default>::default 16: rustc_query_system::query::plumbing::get_query:: 17: rustc_typeck::coherence::check_coherence 18: ::track_errors:: 19: rustc_typeck::check_crate 20: rustc_interface::passes::analysis 21: RINvXNtCsf05yCjQpQCP_12rustc_middle9dep_graphNtNtB3_8dep_node7DepKindNtNtCslXmC8lPkVEE_18rustc_query_system9dep_graph7DepKind9with_depsNCINvMs1_NtB17_5graphINtB2i_8DepGraphBH_E14with_task_implNtNtNtB5_2ty7context6TyCtxtuINtNtCscfKlVaPrZ4r_4core6option6Opt 22: RINvMs1_NtNtCslXmC8lPkVEE_18rustc_query_system9dep_graph5graphINtB6_8DepGraphNtNtNtCsf05yCjQpQCP_12rustc_middle9dep_graph8dep_node7DepKindE9with_taskNtNtNtB1j_2ty7context6TyCtxtuINtNtCscfKlVaPrZ4r_4core6option6OptionNtNtNtCs6msPCmpuZaS_9rustc_ast6expand9a 23: RINvNtCsdpB6R9UgN9W_21rustc_data_structures5stack23ensure_sufficient_stackTINtNtCscfKlVaPrZ4r_4core6result6ResultuNtCsajfgejFs79X_12rustc_errors13ErrorReportedENtNtNtCslXmC8lPkVEE_18rustc_query_system9dep_graph5graph12DepNodeIndexENCINvNtNtB2E_5query8plum 24: as core::default::Default>::default 25: rustc_query_system::query::plumbing::get_query:: 26: ::enter::> 27: RINvMs2_NtCsce66lXUDp1Q_15rustc_interface7queriesNtNtB8_9interface8Compiler5enterNCNCNvCs6X6MaZoVTzA_12rustc_driver12run_compilers_0s0_0INtNtCscfKlVaPrZ4r_4core6result6ResultINtNtB2f_6option6OptionNtB6_6LinkerENtCsajfgejFs79X_12rustc_errors13ErrorReported 28: RINvCs73LUM3RqK1O_10rustc_span15with_source_mapINtNtCscfKlVaPrZ4r_4core6result6ResultuNtCsajfgejFs79X_12rustc_errors13ErrorReportedENCINvNtCsce66lXUDp1Q_15rustc_interface9interface23create_compiler_and_runBJ_NCNvCs6X6MaZoVTzA_12rustc_driver12run_compilers 29: rustc_interface::interface::create_compiler_and_run::, rustc_driver::run_compiler::{closure#1}> 30: RINvMs_CshzKkicZQPlJ_10scoped_tlsINtB5_9ScopedKeyNtCs73LUM3RqK1O_10rustc_span14SessionGlobalsE3setNCINvNtCsce66lXUDp1Q_15rustc_interface9interface12run_compilerINtNtCscfKlVaPrZ4r_4core6result6ResultuNtCsajfgejFs79X_12rustc_errors13ErrorReportedENCNvCs6X6M note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.error: internal compiler error: unexpected panic
note: 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.60.0-dev running on x86_64-pc-windows-msvc
note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -C incremental -C symbol-mangling-version=legacy -Z unstable-options -Z macro-backtrace -C target-feature=+crt-static -C prefer-dynamic -C llvm-args=-import-instr-limit=10 -C embed-bitcode=yes -Z crate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/") -Z binary-dep-depinfo -Z force-unstable-if-unmarked
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
#0 [crate_inherent_impls_overlap_check] check for overlap between inherent impls defined in this crate
#1 [analysis] running analysis passes on this crate
end of query stack
error: could not compilecore
Caused by:
process didn't exit successfully:D:\Code\rust\build\bootstrap/debug/rustc --crate-name core --edition=2021 library\core\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -C metadata=a73f3dcab1ae4e39 -C extra-filename=-a73f3dcab1ae4e39 --out-dir D:\Code\rust\build\x86_64-pc-windows-msvc\stage1-std\x86_64-pc-windows-msvc\release\deps --target x86_64-pc-windows-msvc -C incremental=D:\Code\rust\build\x86_64-pc-windows-msvc\stage1-std\x86_64-pc-windows-msvc\release\incremental -L dependency=D:\Code\rust\build\x86_64-pc-windows-msvc\stage1-std\x86_64-pc-windows-msvc\release\deps -L dependency=D:\Code\rust\build\x86_64-pc-windows-msvc\stage1-std\release\deps -Csymbol-mangling-version=legacy -Zunstable-options -Zmacro-backtrace -Ctarget-feature=+crt-static -Cprefer-dynamic -Cllvm-args=-import-instr-limit=10 -Cembed-bitcode=yes "-Zcrate-attr=doc(html_root_url=\"https://doc.rust-lang.org/nightly/\")" -Z binary-dep-depinfo
(exit code: 0x80000003)
Build completed unsuccessfully in 0:05:35