Skip to content

Nightly regression for #![feature(with_negative_coherence)] #94526

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
yoshuawuyts opened this issue Mar 2, 2022 · 2 comments · Fixed by #95082
Closed

Nightly regression for #![feature(with_negative_coherence)] #94526

yoshuawuyts opened this issue Mar 2, 2022 · 2 comments · Fixed by #95082
Labels
ICEBreaker-Cleanup-Crew Helping to "clean up" bugs with minimal examples and bisections

Comments

@yoshuawuyts
Copy link
Member

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 compile core

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

@spastorino
Copy link
Member

spastorino commented Mar 17, 2022

Would be great to reduce this into a simple example we can test.

@rustbot ping cleanup

@rustbot rustbot added the ICEBreaker-Cleanup-Crew Helping to "clean up" bugs with minimal examples and bisections label Mar 17, 2022
@rustbot
Copy link
Collaborator

rustbot commented Mar 17, 2022

Hey Cleanup Crew ICE-breakers! This bug has been identified as a good
"Cleanup ICE-breaking candidate". In case it's useful, here are some
instructions for tackling these sorts of bugs. Maybe take a look?
Thanks! <3

cc @AminArria @ayazhafiz @camelid @chrissimpkins @contrun @elshize @h-michael @HallerPatrick @hdhoang @hellow554 @henryboisdequin @imtsuki @JamesPatrickGill @kanru @KarlK90 @matheus-consoli @mental32 @nmccarty @Noah-Kennedy @pard68 @PeytonT @pierreN @Redblueflame @RobbieClarken @RobertoSnap @robjtede @SarthakSingh31 @shekohex @sinato @smmalis37 @steffahn @Stupremee @tamuhey @turboladen @woshilapin @yerke

@rust-lang rust-lang deleted a comment from rustbot Mar 17, 2022
@rust-lang rust-lang deleted a comment from rustbot Mar 17, 2022
@bors bors closed this as completed in e70e211 Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ICEBreaker-Cleanup-Crew Helping to "clean up" bugs with minimal examples and bisections
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants