Skip to content
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

ICE caused by calling partial_cmp on type which doesn't implement it #114577

Closed
Blei opened this issue Aug 7, 2023 · 1 comment
Closed

ICE caused by calling partial_cmp on type which doesn't implement it #114577

Blei opened this issue Aug 7, 2023 · 1 comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Blei
Copy link
Contributor

Blei commented Aug 7, 2023

Code

struct MyStruct {
}

fn main() {
    let mut v = vec![MyStruct{}];
    v.sort_by(|a, b| a.partial_cmp(b));
}

Meta

rustc --version --verbose:

rustc 1.71.0 (8ede3aae2 2023-07-12)
binary: rustc
commit-hash: 8ede3aae28fe6e4d52b38157d7bfe0d3bceef225
commit-date: 2023-07-12
host: aarch64-unknown-linux-gnu
release: 1.71.0
LLVM version: 16.0.5

Error output

Backtrace

$ RUST_BACKTRACE=1 cargo build
   Compiling repro v0.1.0 (/home/pb/repro)
thread 'rustc' panicked at 'index out of bounds: the len is 24 but the index is 29', /cargo/registry/src/index.crates.io-6f17d22bba15001f/ena-0.14.2/src/snapshot_vec.rs:199:10
stack backtrace:
   0: rust_begin_unwind
             at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/panicking.rs:593:5
   1: core::panicking::panic_fmt
             at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/panicking.rs:67:14
   2: core::panicking::panic_bounds_check
             at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/panicking.rs:162:5
   3: <rustc_infer::infer::type_variable::TypeVariableTable>::replace_if_possible
   4: <rustc_infer::infer::equate::Equate as rustc_middle::ty::relate::TypeRelation>::tys
   5: <rustc_infer::infer::InferCtxt>::commit_if_ok::<rustc_infer::infer::InferOk<()>, rustc_middle::ty::error::TypeError, <rustc_infer::infer::at::Trace>::eq<rustc_middle::ty::Ty>::{closure#0}>
   6: <rustc_infer::infer::InferCtxt>::can_eq::<rustc_middle::ty::Ty>
   7: <rustc_hir_typeck::fn_ctxt::FnCtxt>::suggest_derive
   8: <rustc_hir_typeck::fn_ctxt::FnCtxt>::report_no_match_method_error
   9: <rustc_hir_typeck::fn_ctxt::FnCtxt>::report_method_error
  10: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
  11: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  12: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_return_expr
  13: rustc_hir_typeck::check::check_fn
  14: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_closure
  15: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
  16: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  17: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_argument_types
  18: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_method_argument_types
  19: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
  20: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  21: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_stmt
  22: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_block_with_expected
  23: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
  24: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  25: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_return_expr
  26: rustc_hir_typeck::check::check_fn
  27: rustc_hir_typeck::typeck
  28: rustc_hir_typeck::used_trait_imports
  29: rustc_hir_analysis::check_crate
  30: rustc_interface::passes::analysis
  31: <rustc_interface::queries::QueryResult<&rustc_middle::ty::context::GlobalCtxt>>::enter::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}::{closure#2}::{closure#4}>
  32: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_span::ErrorGuaranteed>>
  33: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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.71.0 (8ede3aae2 2023-07-12) running on aarch64-unknown-linux-gnu

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [typeck] type-checking `main`
#1 [used_trait_imports] finding used_trait_imports `main`
#2 [analysis] running analysis passes on this crate
end of query stack
error: internal compiler error: no warnings or errors encountered even though `delayed_good_path_bugs` issued

error: internal compiler error: trimmed_def_paths constructed but no error emitted; use `DelayDm` for lints or `with_no_trimmed_paths` for debugging
  |
  = note: delayed at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/compiler/rustc_errors/src/lib.rs:1620:30
             0: std::backtrace_rs::backtrace::libunwind::trace
                       at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
             1: std::backtrace_rs::backtrace::trace_unsynchronized
                       at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
             2: std::backtrace::Backtrace::create
                       at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/backtrace.rs:332:13
             3: <rustc_errors::Handler>::delay_good_path_bug::<&str>
             4: rustc_middle::ty::print::pretty::trimmed_def_paths
             5: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::trimmed_def_paths::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
             6: <rustc_query_impl::query_impl::trimmed_def_paths::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, ())>>::call_once
             7: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
             8: rustc_query_impl::query_impl::trimmed_def_paths::get_query_incr::__rust_end_short_backtrace
             9: <rustc_middle::ty::print::pretty::FmtPrinter as rustc_middle::ty::print::Printer>::print_def_path
            10: <rustc_middle::ty::print::pretty::FmtPrinter as rustc_middle::ty::print::pretty::PrettyPrinter>::pretty_print_type
            11: <rustc_middle::ty::sty::TypeAndMut as rustc_middle::ty::print::Print<rustc_middle::ty::print::pretty::FmtPrinter>>::print
            12: <rustc_middle::ty::print::pretty::FmtPrinter as rustc_middle::ty::print::pretty::PrettyPrinter>::pretty_print_type
            13: <rustc_middle::ty::context::TyCtxt>::short_ty_string
            14: <rustc_hir_typeck::fn_ctxt::FnCtxt>::report_no_match_method_error
            15: <rustc_hir_typeck::fn_ctxt::FnCtxt>::report_method_error
            16: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            17: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            18: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_return_expr
            19: rustc_hir_typeck::check::check_fn
            20: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_closure
            21: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            22: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            23: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_argument_types
            24: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_method_argument_types
            25: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            26: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            27: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_stmt
            28: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_block_with_expected
            29: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            30: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            31: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_return_expr
            32: rustc_hir_typeck::check::check_fn
            33: rustc_hir_typeck::typeck
            34: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            35: <rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId)>>::call_once
            36: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            37: rustc_query_impl::query_impl::typeck::get_query_incr::__rust_end_short_backtrace
            38: rustc_hir_typeck::used_trait_imports
            39: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::used_trait_imports::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            40: <rustc_query_impl::query_impl::used_trait_imports::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId)>>::call_once
            41: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            42: rustc_query_impl::query_impl::used_trait_imports::get_query_incr::__rust_end_short_backtrace
            43: rustc_hir_analysis::check_crate
            44: rustc_interface::passes::analysis
            45: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            46: <rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, ())>>::call_once
            47: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            48: rustc_query_impl::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
            49: <rustc_interface::queries::QueryResult<&rustc_middle::ty::context::GlobalCtxt>>::enter::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}::{closure#2}::{closure#4}>
            50: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_span::ErrorGuaranteed>>
            51: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            52: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            53: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
            54: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/boxed.rs:1985:9
            55: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/boxed.rs:1985:9
            56: std::sys::unix::thread::Thread::new::thread_start
                       at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/sys/unix/thread.rs:108:17
            57: <unknown>
            58: <unknown>
          

error: internal compiler error: used a `TypeErrCtxt` without raising an error or lint
  |
  = note: delayed at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/compiler/rustc_errors/src/lib.rs:1620:30
             0: std::backtrace_rs::backtrace::libunwind::trace
                       at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
             1: std::backtrace_rs::backtrace::trace_unsynchronized
                       at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
             2: std::backtrace::Backtrace::create
                       at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/backtrace.rs:332:13
             3: <rustc_errors::Handler>::delay_good_path_bug::<&str>
             4: core::ptr::drop_in_place::<rustc_infer::infer::error_reporting::TypeErrCtxt>
             5: <rustc_hir_typeck::fn_ctxt::FnCtxt>::report_no_match_method_error
             6: <rustc_hir_typeck::fn_ctxt::FnCtxt>::report_method_error
             7: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
             8: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
             9: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_return_expr
            10: rustc_hir_typeck::check::check_fn
            11: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_closure
            12: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            13: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            14: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_argument_types
            15: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_method_argument_types
            16: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            17: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            18: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_stmt
            19: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_block_with_expected
            20: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            21: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            22: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_return_expr
            23: rustc_hir_typeck::check::check_fn
            24: rustc_hir_typeck::typeck
            25: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            26: <rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId)>>::call_once
            27: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            28: rustc_query_impl::query_impl::typeck::get_query_incr::__rust_end_short_backtrace
            29: rustc_hir_typeck::used_trait_imports
            30: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::used_trait_imports::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            31: <rustc_query_impl::query_impl::used_trait_imports::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId)>>::call_once
            32: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            33: rustc_query_impl::query_impl::used_trait_imports::get_query_incr::__rust_end_short_backtrace
            34: rustc_hir_analysis::check_crate
            35: rustc_interface::passes::analysis
            36: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            37: <rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, ())>>::call_once
            38: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            39: rustc_query_impl::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
            40: <rustc_interface::queries::QueryResult<&rustc_middle::ty::context::GlobalCtxt>>::enter::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}::{closure#2}::{closure#4}>
            41: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_span::ErrorGuaranteed>>
            42: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            43: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            44: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
            45: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/boxed.rs:1985:9
            46: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/boxed.rs:1985:9
            47: std::sys::unix::thread::Thread::new::thread_start
                       at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/sys/unix/thread.rs:108:17
            48: <unknown>
            49: <unknown>
          

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.71.0 (8ede3aae2 2023-07-12) running on aarch64-unknown-linux-gnu

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
thread 'rustc' panicked at 'panic in a function that cannot unwind', library/core/src/panicking.rs:126:5
stack backtrace:
   0:     0xffff7b91216c - std::backtrace_rs::backtrace::libunwind::trace::h5ba5357b9a083fa0
                               at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0xffff7b91216c - std::backtrace_rs::backtrace::trace_unsynchronized::h50209a046e340266
                               at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0xffff7b91216c - std::sys_common::backtrace::_print_fmt::hc1f0fe6a809af61e
                               at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/sys_common/backtrace.rs:65:5
   3:     0xffff7b91216c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1dc727a23fab6b83
                               at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/sys_common/backtrace.rs:44:22
   4:     0xffff7b968614 - core::fmt::rt::Argument::fmt::hdb7178e51bb87859
                               at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/fmt/rt.rs:138:9
   5:     0xffff7b968614 - core::fmt::write::h93016cb9b016717f
                               at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/fmt/mod.rs:1094:21
   6:     0xffff7b907718 - std::io::Write::write_fmt::hd05d9d1974faeacd
                               at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/io/mod.rs:1713:15
   7:     0xffff7b911fb8 - std::sys_common::backtrace::_print::h63e8991360658009
                               at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/sys_common/backtrace.rs:47:5
   8:     0xffff7b911fb8 - std::sys_common::backtrace::print::hc0e015b240e04d4b
                               at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/sys_common/backtrace.rs:34:9
   9:     0xffff7b914958 - std::panicking::default_hook::{{closure}}::h578d14e5d7d719df
  10:     0xffff7b914748 - std::panicking::default_hook::h79df13a143e47d78
                               at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/panicking.rs:288:9
  11:     0xffff7c66f304 - rustc_driver_impl[492613cbdc8a8111]::install_ice_hook::{closure#0}
  12:     0xffff7b9150a4 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hcc0795040a45dbd6
                               at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/boxed.rs:1999:9
  13:     0xffff7b9150a4 - std::panicking::rust_panic_with_hook::hacc6c775e464554f
                               at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/panicking.rs:709:13
  14:     0xffff7b914df8 - std::panicking::begin_panic_handler::{{closure}}::hc234bdc87cdab675
                               at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/panicking.rs:595:13
  15:     0xffff7b912578 - std::sys_common::backtrace::__rust_end_short_backtrace::h413cb82ec8fa424a
                               at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/sys_common/backtrace.rs:151:18
  16:     0xffff7b914b9c - rust_begin_unwind
                               at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/panicking.rs:593:5
  17:     0xffff7b8e1a8c - core::panicking::panic_nounwind_fmt::hde4ec10aeb9da661
                               at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/panicking.rs:96:14
  18:     0xffff7b8e1b08 - core::panicking::panic_nounwind::h35760e692767f269
                               at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/panicking.rs:126:5
  19:     0xffff7b8e1c00 - core::panicking::panic_cannot_unwind::h89c70eaf666fdee4
                               at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/panicking.rs:188:5
  20:     0xffff7c6a576c - <scoped_tls[c4fa54d76b44a017]::ScopedKey<rustc_span[5d7ecd2103a31699]::SessionGlobals>>::set::<rustc_interface[be9a1f241e7bec3b]::interface::run_compiler<core[ce7c1b80f89f61af]::result::Result<(), rustc_span[5d7ecd2103a31699]::ErrorGuaranteed>, rustc_driver_impl[492613cbdc8a8111]::run_compiler::{closure#1}>::{closure#0}, core[ce7c1b80f89f61af]::result::Result<(), rustc_span[5d7ecd2103a31699]::ErrorGuaranteed>>
  21:     0xffff7c64365c - std[fa0cf8fa971950e]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[be9a1f241e7bec3b]::util::run_in_thread_pool_with_globals<rustc_interface[be9a1f241e7bec3b]::interface::run_compiler<core[ce7c1b80f89f61af]::result::Result<(), rustc_span[5d7ecd2103a31699]::ErrorGuaranteed>, rustc_driver_impl[492613cbdc8a8111]::run_compiler::{closure#1}>::{closure#0}, core[ce7c1b80f89f61af]::result::Result<(), rustc_span[5d7ecd2103a31699]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[ce7c1b80f89f61af]::result::Result<(), rustc_span[5d7ecd2103a31699]::ErrorGuaranteed>>
  22:     0xffff7c69b39c - <<std[fa0cf8fa971950e]::thread::Builder>::spawn_unchecked_<rustc_interface[be9a1f241e7bec3b]::util::run_in_thread_pool_with_globals<rustc_interface[be9a1f241e7bec3b]::interface::run_compiler<core[ce7c1b80f89f61af]::result::Result<(), rustc_span[5d7ecd2103a31699]::ErrorGuaranteed>, rustc_driver_impl[492613cbdc8a8111]::run_compiler::{closure#1}>::{closure#0}, core[ce7c1b80f89f61af]::result::Result<(), rustc_span[5d7ecd2103a31699]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[ce7c1b80f89f61af]::result::Result<(), rustc_span[5d7ecd2103a31699]::ErrorGuaranteed>>::{closure#1} as core[ce7c1b80f89f61af]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  23:     0xffff7b91ea60 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hf086f9e2ccb58764
                               at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/boxed.rs:1985:9
  24:     0xffff7b91ea60 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h7d8a44b475ea4a2f
                               at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/boxed.rs:1985:9
  25:     0xffff7b91ea60 - std::sys::unix::thread::Thread::new::thread_start::h9739608577c2d86d
                               at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/sys/unix/thread.rs:108:17
  26:     0xffff7b73e814 - <unknown>
  27:     0xffff7b7a7d5c - <unknown>
  28:                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.71.0 (8ede3aae2 2023-07-12) running on aarch64-unknown-linux-gnu

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
thread caused non-unwinding panic. aborting.
error: could not compile `repro` (bin "repro")

Caused by:
  process didn't exit successfully: `/home/pb/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/bin/rustc --crate-name repro --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=168 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=4d475bc5aedb8b82 -C extra-filename=-4d475bc5aedb8b82 --out-dir /home/pb/repro/target/debug/deps -C incremental=/home/pb/repro/target/debug/incremental -L dependency=/home/pb/repro/target/debug/deps` (signal: 6, SIGABRT: process abort signal)

@Blei Blei added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 7, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 7, 2023
@Blei Blei changed the title Calling partial_cmp on type which doesn't implement it ICE caused by calling partial_cmp on type which doesn't implement it Aug 7, 2023
@Blei
Copy link
Contributor Author

Blei commented Aug 7, 2023

Ok, nvm, this is a dupe of #114049.

@Blei Blei closed this as not planned Won't fix, can't repro, duplicate, stale Aug 7, 2023
@Noratrieb Noratrieb removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants