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: len is 1 but index is 1: rustc_middle/src/ty/subst.rs #94822

Closed
matthiaskrgr opened this issue Mar 10, 2022 · 3 comments
Closed

ICE: len is 1 but index is 1: rustc_middle/src/ty/subst.rs #94822

matthiaskrgr opened this issue Mar 10, 2022 · 3 comments
Labels
C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. 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

@matthiaskrgr
Copy link
Member

matthiaskrgr commented Mar 10, 2022

Code

fn a() -> bool {
 for i in 0..80*25 {
       || {};
 }
#[lang = "sized"]
trait A {}
}

Meta

rustc --version --verbose:

rustc 1.61.0-nightly (458262b13 2022-03-09)
binary: rustc
commit-hash: 458262b1315e0de7be940fe95e111bb045e4a2a4
commit-date: 2022-03-09
host: x86_64-unknown-linux-gnu
release: 1.61.0-nightly
LLVM version: 14.0.0

Error output

error[E0658]: language items are subject to change
 --> icemaker_63031.rs:5:1
  |
5 | #[lang = "sized"]
  | ^^^^^^^^^^^^^^^^^
  |
  = help: add `#![feature(lang_items)]` to the crate attributes to enable

error[E0601]: `main` function not found in crate `icemaker_63031`
 --> icemaker_63031.rs:7:2
  |
7 | }
  |  ^ consider adding a `main` function to `icemaker_63031.rs`

error[E0152]: found duplicate lang item `sized`
 --> icemaker_63031.rs:6:1
  |
6 | trait A {}
  | ^^^^^^^^^^
  |
  = note: the lang item is first defined in crate `core` (which `std` depends on)
  = note: first definition in `core` loaded from /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-0e3656b1fda5fd7b.rlib
  = note: second definition in the local crate (`icemaker_63031`)

error[E0277]: the size for values of type `{integer}` cannot be known at compilation time
  --> icemaker_63031.rs:2:11
   |
2  |  for i in 0..80*25 {
   |           ^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `{integer}`
note: required by a bound in `std::ops::Range`
  --> /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/range.rs:80:18
   |
80 | pub struct Range<Idx> {
   |                  ^^^ required by this bound in `std::ops::Range`

thread 'rustc' panicked at 'index out of bounds: the len is 1 but the index is 1', /rustc/458262b1315e0de7be940fe95e111bb045e4a2a4/compiler/rustc_middle/src/ty/subst.rs:364:43
Backtrace


thread 'rustc' panicked at 'index out of bounds: the len is 1 but the index is 1', /rustc/458262b1315e0de7be940fe95e111bb045e4a2a4/compiler/rustc_middle/src/ty/subst.rs:364:43
stack backtrace:
   0:     0x7f264de9da6c - std::backtrace_rs::backtrace::libunwind::trace::h46c3491033e3df9f
                               at /rustc/458262b1315e0de7be940fe95e111bb045e4a2a4/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f264de9da6c - std::backtrace_rs::backtrace::trace_unsynchronized::h4ab169bbb354c187
                               at /rustc/458262b1315e0de7be940fe95e111bb045e4a2a4/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f264de9da6c - std::sys_common::backtrace::_print_fmt::hc15ef2dc9a287243
                               at /rustc/458262b1315e0de7be940fe95e111bb045e4a2a4/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7f264de9da6c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h501b36300ab7e9cf
                               at /rustc/458262b1315e0de7be940fe95e111bb045e4a2a4/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7f264def756c - core::fmt::write::hdf95afd13c610d33
                               at /rustc/458262b1315e0de7be940fe95e111bb045e4a2a4/library/core/src/fmt/mod.rs:1190:17
   5:     0x7f264de8e5d1 - std::io::Write::write_fmt::h0d82f708e53862e9
                               at /rustc/458262b1315e0de7be940fe95e111bb045e4a2a4/library/std/src/io/mod.rs:1655:15
   6:     0x7f264dea0ad5 - std::sys_common::backtrace::_print::h01ef9da1bf4e707e
                               at /rustc/458262b1315e0de7be940fe95e111bb045e4a2a4/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7f264dea0ad5 - std::sys_common::backtrace::print::h1e9c977feca8e5bd
                               at /rustc/458262b1315e0de7be940fe95e111bb045e4a2a4/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7f264dea0ad5 - std::panicking::default_hook::{{closure}}::hbef663e6aac7b136
                               at /rustc/458262b1315e0de7be940fe95e111bb045e4a2a4/library/std/src/panicking.rs:295:22
   9:     0x7f264dea0778 - std::panicking::default_hook::h640314fcce137ca1
                               at /rustc/458262b1315e0de7be940fe95e111bb045e4a2a4/library/std/src/panicking.rs:314:9
  10:     0x7f264e6c5591 - rustc_driver[2a0ca96018d9e466]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f264dea1221 - std::panicking::rust_panic_with_hook::h5b324d4fa263a7f9
                               at /rustc/458262b1315e0de7be940fe95e111bb045e4a2a4/library/std/src/panicking.rs:702:17
  12:     0x7f264dea1057 - std::panicking::begin_panic_handler::{{closure}}::h737c0d8ec3d22f87
                               at /rustc/458262b1315e0de7be940fe95e111bb045e4a2a4/library/std/src/panicking.rs:588:13
  13:     0x7f264de9df24 - std::sys_common::backtrace::__rust_end_short_backtrace::h19199a581de22779
                               at /rustc/458262b1315e0de7be940fe95e111bb045e4a2a4/library/std/src/sys_common/backtrace.rs:138:18
  14:     0x7f264dea0d89 - rust_begin_unwind
                               at /rustc/458262b1315e0de7be940fe95e111bb045e4a2a4/library/std/src/panicking.rs:584:5
  15:     0x7f264de64a63 - core::panicking::panic_fmt::h40bd402b41242006
                               at /rustc/458262b1315e0de7be940fe95e111bb045e4a2a4/library/core/src/panicking.rs:143:14
  16:     0x7f264de649a2 - core::panicking::panic_bounds_check::ha853e9ef8305a2eb
                               at /rustc/458262b1315e0de7be940fe95e111bb045e4a2a4/library/core/src/panicking.rs:84:5
  17:     0x7f264f492f0a - <rustc_infer[6830dc6826b3da3]::infer::InferCtxt as rustc_trait_selection[9870cae3a21cea22]::traits::error_reporting::suggestions::InferCtxtExt>::suggest_floating_point_literal
  18:     0x7f264f496fa3 - <rustc_infer[6830dc6826b3da3]::infer::InferCtxt as rustc_trait_selection[9870cae3a21cea22]::traits::error_reporting::InferCtxtExt>::report_selection_error
  19:     0x7f264f49e06b - <rustc_infer[6830dc6826b3da3]::infer::InferCtxt as rustc_trait_selection[9870cae3a21cea22]::traits::error_reporting::InferCtxtPrivExt>::report_fulfillment_error
  20:     0x7f264f4936bd - <rustc_infer[6830dc6826b3da3]::infer::InferCtxt as rustc_trait_selection[9870cae3a21cea22]::traits::error_reporting::InferCtxtExt>::report_fulfillment_errors
  21:     0x7f264fa614d9 - <rustc_typeck[7ae584030a131cc9]::check::fn_ctxt::FnCtxt>::check_overloaded_binop
  22:     0x7f264fa60943 - <rustc_typeck[7ae584030a131cc9]::check::fn_ctxt::FnCtxt>::check_binop
  23:     0x7f264fa7023a - <rustc_typeck[7ae584030a131cc9]::check::fn_ctxt::FnCtxt>::check_expr_kind
  24:     0x7f264fa44002 - <rustc_typeck[7ae584030a131cc9]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  25:     0x7f264fa71c9b - <rustc_typeck[7ae584030a131cc9]::check::fn_ctxt::FnCtxt>::check_expr_kind
  26:     0x7f264fa44002 - <rustc_typeck[7ae584030a131cc9]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  27:     0x7f264fa57db8 - <rustc_typeck[7ae584030a131cc9]::check::fn_ctxt::FnCtxt>::check_argument_types
  28:     0x7f264fa3bb06 - <rustc_typeck[7ae584030a131cc9]::check::fn_ctxt::FnCtxt>::confirm_builtin_call
  29:     0x7f264fa38590 - <rustc_typeck[7ae584030a131cc9]::check::fn_ctxt::FnCtxt>::check_call
  30:     0x7f264fa6fd08 - <rustc_typeck[7ae584030a131cc9]::check::fn_ctxt::FnCtxt>::check_expr_kind
  31:     0x7f264fa44002 - <rustc_typeck[7ae584030a131cc9]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  32:     0x7f26507786e5 - <rustc_typeck[7ae584030a131cc9]::check::fn_ctxt::FnCtxt>::demand_scrutinee_type
  33:     0x7f264fa6c869 - <rustc_typeck[7ae584030a131cc9]::check::fn_ctxt::FnCtxt>::check_match
  34:     0x7f264fa710de - <rustc_typeck[7ae584030a131cc9]::check::fn_ctxt::FnCtxt>::check_expr_kind
  35:     0x7f264fa44002 - <rustc_typeck[7ae584030a131cc9]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  36:     0x7f264fa71ef5 - <rustc_typeck[7ae584030a131cc9]::check::fn_ctxt::FnCtxt>::check_expr_kind
  37:     0x7f264fa44002 - <rustc_typeck[7ae584030a131cc9]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  38:     0x7f264fa5bd3a - <rustc_typeck[7ae584030a131cc9]::check::fn_ctxt::FnCtxt>::check_stmt
  39:     0x7f264fa5cbda - <rustc_typeck[7ae584030a131cc9]::check::fn_ctxt::FnCtxt>::check_block_with_expected
  40:     0x7f264fa6fd3e - <rustc_typeck[7ae584030a131cc9]::check::fn_ctxt::FnCtxt>::check_expr_kind
  41:     0x7f264fa44002 - <rustc_typeck[7ae584030a131cc9]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  42:     0x7f264fb6f9b7 - rustc_typeck[7ae584030a131cc9]::check::check::check_fn
  43:     0x7f264fae032d - <rustc_infer[6830dc6826b3da3]::infer::InferCtxtBuilder>::enter::<&rustc_middle[196f2c11c2e6806c]::ty::context::TypeckResults, <rustc_typeck[7ae584030a131cc9]::check::inherited::InheritedBuilder>::enter<rustc_typeck[7ae584030a131cc9]::check::typeck_with_fallback<rustc_typeck[7ae584030a131cc9]::check::typeck::{closure#0}>::{closure#1}, &rustc_middle[196f2c11c2e6806c]::ty::context::TypeckResults>::{closure#0}>
  44:     0x7f264fac73bf - rustc_typeck[7ae584030a131cc9]::check::typeck
  45:     0x7f264ff80377 - rustc_query_system[68aa2a3da4535f14]::query::plumbing::try_execute_query::<rustc_query_impl[a379114de9839269]::plumbing::QueryCtxt, rustc_query_system[68aa2a3da4535f14]::query::caches::DefaultCache<rustc_span[729ef1fe2cb7b415]::def_id::LocalDefId, &rustc_middle[196f2c11c2e6806c]::ty::context::TypeckResults>>
  46:     0x7f26500601d8 - <rustc_query_impl[a379114de9839269]::Queries as rustc_middle[196f2c11c2e6806c]::ty::query::QueryEngine>::typeck
  47:     0x7f264fac7586 - rustc_typeck[7ae584030a131cc9]::check::typeck
  48:     0x7f264ff80377 - rustc_query_system[68aa2a3da4535f14]::query::plumbing::try_execute_query::<rustc_query_impl[a379114de9839269]::plumbing::QueryCtxt, rustc_query_system[68aa2a3da4535f14]::query::caches::DefaultCache<rustc_span[729ef1fe2cb7b415]::def_id::LocalDefId, &rustc_middle[196f2c11c2e6806c]::ty::context::TypeckResults>>
  49:     0x7f26500601d8 - <rustc_query_impl[a379114de9839269]::Queries as rustc_middle[196f2c11c2e6806c]::ty::query::QueryEngine>::typeck
  50:     0x7f264fb263dc - <rustc_middle[196f2c11c2e6806c]::hir::map::Map>::par_body_owners::<rustc_typeck[7ae584030a131cc9]::check::typeck_item_bodies::{closure#0}>
  51:     0x7f26507b9e1c - rustc_typeck[7ae584030a131cc9]::check::typeck_item_bodies
  52:     0x7f2650a04877 - rustc_query_system[68aa2a3da4535f14]::query::plumbing::try_execute_query::<rustc_query_impl[a379114de9839269]::plumbing::QueryCtxt, rustc_query_system[68aa2a3da4535f14]::query::caches::DefaultCache<(), ()>>
  53:     0x7f2650a2b241 - rustc_query_system[68aa2a3da4535f14]::query::plumbing::get_query::<rustc_query_impl[a379114de9839269]::queries::typeck_item_bodies, rustc_query_impl[a379114de9839269]::plumbing::QueryCtxt>
  54:     0x7f26507ba83a - rustc_typeck[7ae584030a131cc9]::check_crate
  55:     0x7f26505484c7 - rustc_interface[918eb7e942aa3a9d]::passes::analysis
  56:     0x7f26509fa58e - rustc_query_system[68aa2a3da4535f14]::query::plumbing::try_execute_query::<rustc_query_impl[a379114de9839269]::plumbing::QueryCtxt, rustc_query_system[68aa2a3da4535f14]::query::caches::DefaultCache<(), core[a3fb8d670b17dca4]::result::Result<(), rustc_errors[ffe98a503933c183]::ErrorGuaranteed>>>
  57:     0x7f2650a39aae - rustc_query_system[68aa2a3da4535f14]::query::plumbing::get_query::<rustc_query_impl[a379114de9839269]::queries::analysis, rustc_query_impl[a379114de9839269]::plumbing::QueryCtxt>
  58:     0x7f26505266a4 - <rustc_interface[918eb7e942aa3a9d]::passes::QueryContext>::enter::<rustc_driver[2a0ca96018d9e466]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[a3fb8d670b17dca4]::result::Result<(), rustc_errors[ffe98a503933c183]::ErrorGuaranteed>>
  59:     0x7f26505047c8 - <rustc_interface[918eb7e942aa3a9d]::interface::Compiler>::enter::<rustc_driver[2a0ca96018d9e466]::run_compiler::{closure#1}::{closure#2}, core[a3fb8d670b17dca4]::result::Result<core[a3fb8d670b17dca4]::option::Option<rustc_interface[918eb7e942aa3a9d]::queries::Linker>, rustc_errors[ffe98a503933c183]::ErrorGuaranteed>>
  60:     0x7f265051734f - rustc_span[729ef1fe2cb7b415]::with_source_map::<core[a3fb8d670b17dca4]::result::Result<(), rustc_errors[ffe98a503933c183]::ErrorGuaranteed>, rustc_interface[918eb7e942aa3a9d]::interface::create_compiler_and_run<core[a3fb8d670b17dca4]::result::Result<(), rustc_errors[ffe98a503933c183]::ErrorGuaranteed>, rustc_driver[2a0ca96018d9e466]::run_compiler::{closure#1}>::{closure#1}>
  61:     0x7f26505054a4 - rustc_interface[918eb7e942aa3a9d]::interface::create_compiler_and_run::<core[a3fb8d670b17dca4]::result::Result<(), rustc_errors[ffe98a503933c183]::ErrorGuaranteed>, rustc_driver[2a0ca96018d9e466]::run_compiler::{closure#1}>
  62:     0x7f2650503592 - <scoped_tls[4c2cab578bca6f50]::ScopedKey<rustc_span[729ef1fe2cb7b415]::SessionGlobals>>::set::<rustc_interface[918eb7e942aa3a9d]::interface::run_compiler<core[a3fb8d670b17dca4]::result::Result<(), rustc_errors[ffe98a503933c183]::ErrorGuaranteed>, rustc_driver[2a0ca96018d9e466]::run_compiler::{closure#1}>::{closure#0}, core[a3fb8d670b17dca4]::result::Result<(), rustc_errors[ffe98a503933c183]::ErrorGuaranteed>>
  63:     0x7f265050186f - std[787e7261aab00ccc]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[918eb7e942aa3a9d]::util::run_in_thread_pool_with_globals<rustc_interface[918eb7e942aa3a9d]::interface::run_compiler<core[a3fb8d670b17dca4]::result::Result<(), rustc_errors[ffe98a503933c183]::ErrorGuaranteed>, rustc_driver[2a0ca96018d9e466]::run_compiler::{closure#1}>::{closure#0}, core[a3fb8d670b17dca4]::result::Result<(), rustc_errors[ffe98a503933c183]::ErrorGuaranteed>>::{closure#0}, core[a3fb8d670b17dca4]::result::Result<(), rustc_errors[ffe98a503933c183]::ErrorGuaranteed>>
  64:     0x7f2650501b69 - <<std[787e7261aab00ccc]::thread::Builder>::spawn_unchecked_<rustc_interface[918eb7e942aa3a9d]::util::run_in_thread_pool_with_globals<rustc_interface[918eb7e942aa3a9d]::interface::run_compiler<core[a3fb8d670b17dca4]::result::Result<(), rustc_errors[ffe98a503933c183]::ErrorGuaranteed>, rustc_driver[2a0ca96018d9e466]::run_compiler::{closure#1}>::{closure#0}, core[a3fb8d670b17dca4]::result::Result<(), rustc_errors[ffe98a503933c183]::ErrorGuaranteed>>::{closure#0}, core[a3fb8d670b17dca4]::result::Result<(), rustc_errors[ffe98a503933c183]::ErrorGuaranteed>>::{closure#1} as core[a3fb8d670b17dca4]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  65:     0x7f264deab343 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h5c266408d0190ecf
                               at /rustc/458262b1315e0de7be940fe95e111bb045e4a2a4/library/alloc/src/boxed.rs:1854:9
  66:     0x7f264deab343 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h9024b13a351d4d0c
                               at /rustc/458262b1315e0de7be940fe95e111bb045e4a2a4/library/alloc/src/boxed.rs:1854:9
  67:     0x7f264deab343 - std::sys::unix::thread::Thread::new::thread_start::hd9882aa648bba6a5
                               at /rustc/458262b1315e0de7be940fe95e111bb045e4a2a4/library/std/src/sys/unix/thread.rs:108:17
  68:     0x7f264dc835c2 - start_thread
  69:     0x7f264dd08584 - __clone
  70:                0x0 - <unknown>

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.61.0-nightly (458262b13 2022-03-09) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [typeck] type-checking `a`
#1 [typeck] type-checking `a::{closure#0}`
#2 [typeck_item_bodies] type-checking all item bodies
#3 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 4 previous errors

Some errors have detailed explanations: E0152, E0277, E0601, E0658.
For more information about an error, try `rustc --explain E0152`.

@matthiaskrgr matthiaskrgr added 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. C-bug Category: This is a bug. labels Mar 10, 2022
@bugadani
Copy link
Contributor

Slightly smaller repro:

#![feature(lang_items)]

#[lang = "sized"]
trait A {}

fn a() {
    let _ = 0..80*25;
}
Backtrace
error[E0152]: found duplicate lang item `sized`
 --> :4:1
  |
4 | trait A {}
  | ^^^^^^^^^^
  |
  = note: the lang item is first defined in crate `core` (which `std` depends on)
  = note: first definition in `core` loaded from /opt/compiler-explorer/rust-nightly/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-0e3656b1fda5fd7b.rlib
  = note: second definition in the local crate (`example`)

error[E0277]: the size for values of type {integer} cannot be known at compilation time
--> :7:13
|
7 | let _ = 0..80*25;
| ^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait Sized is not implemented for {integer}
note: required by a bound in std::ops::Range

thread 'rustc' panicked at 'index out of bounds: the len is 1 but the index is 1', /rustc/1eb72580d076935a3e590deb6e5813a5aef3eca4/compiler/rustc_middle/src/ty/subst.rs:364:43
stack backtrace:
0: 0x7fb1f1afca9c - std::backtrace_rs::backtrace::libunwind::trace::h6ac5130eed1dcf9f
at /rustc/1eb72580d076935a3e590deb6e5813a5aef3eca4/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x7fb1f1afca9c - std::backtrace_rs::backtrace::trace_unsynchronized::h2b7158a3e8f3af61
at /rustc/1eb72580d076935a3e590deb6e5813a5aef3eca4/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7fb1f1afca9c - std::sys_common::backtrace::_print_fmt::h75f85af0fdb05879
at /rustc/1eb72580d076935a3e590deb6e5813a5aef3eca4/library/std/src/sys_common/backtrace.rs:66:5
3: 0x7fb1f1afca9c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h5f37961d0a32553a
at /rustc/1eb72580d076935a3e590deb6e5813a5aef3eca4/library/std/src/sys_common/backtrace.rs:45:22
4: 0x7fb1f1b5674c - core::fmt::write::h29046f193433d2f3
at /rustc/1eb72580d076935a3e590deb6e5813a5aef3eca4/library/core/src/fmt/mod.rs:1190:17
5: 0x7fb1f1aed5f1 - std::io::Write::write_fmt::h85f676fd3a2afd23
at /rustc/1eb72580d076935a3e590deb6e5813a5aef3eca4/library/std/src/io/mod.rs:1655:15
6: 0x7fb1f1affb05 - std::sys_common::backtrace::_print::h79369394439142a7
at /rustc/1eb72580d076935a3e590deb6e5813a5aef3eca4/library/std/src/sys_common/backtrace.rs:48:5
7: 0x7fb1f1affb05 - std::sys_common::backtrace::print::h358c3300488d298b
at /rustc/1eb72580d076935a3e590deb6e5813a5aef3eca4/library/std/src/sys_common/backtrace.rs:35:9
8: 0x7fb1f1affb05 - std::panicking::default_hook::{{closure}}::hbbc54c317f78453b
at /rustc/1eb72580d076935a3e590deb6e5813a5aef3eca4/library/std/src/panicking.rs:295:22
9: 0x7fb1f1aff7a8 - std::panicking::default_hook::he69a91523cadf6a8
at /rustc/1eb72580d076935a3e590deb6e5813a5aef3eca4/library/std/src/panicking.rs:314:9
10: 0x7fb1f2294971 - rustc_driver[49e5c50138067fc5]::DEFAULT_HOOK::{closure#0}::{closure#0}
11: 0x7fb1f1b00251 - std::panicking::rust_panic_with_hook::h88c443d0811b5ee8
at /rustc/1eb72580d076935a3e590deb6e5813a5aef3eca4/library/std/src/panicking.rs:702:17
12: 0x7fb1f1b00087 - std::panicking::begin_panic_handler::{{closure}}::hf0e3adb08d6f840d
at /rustc/1eb72580d076935a3e590deb6e5813a5aef3eca4/library/std/src/panicking.rs:588:13
13: 0x7fb1f1afcf54 - std::sys_common::backtrace::__rust_end_short_backtrace::h876fe414bbc74075
at /rustc/1eb72580d076935a3e590deb6e5813a5aef3eca4/library/std/src/sys_common/backtrace.rs:138:18
14: 0x7fb1f1affdb9 - rust_begin_unwind
at /rustc/1eb72580d076935a3e590deb6e5813a5aef3eca4/library/std/src/panicking.rs:584:5
15: 0x7fb1f1ac3a93 - core::panicking::panic_fmt::hb2c11159edd998a3
at /rustc/1eb72580d076935a3e590deb6e5813a5aef3eca4/library/core/src/panicking.rs:143:14
16: 0x7fb1f1ac39d2 - core::panicking::panic_bounds_check::h3395e3e30f1cf171
at /rustc/1eb72580d076935a3e590deb6e5813a5aef3eca4/library/core/src/panicking.rs:84:5
17: 0x7fb1f306383a - <rustc_infer[51c380136aeb3624]::infer::InferCtxt as rustc_trait_selection[5f3069b2459f8e16]::traits::error_reporting::suggestions::InferCtxtExt>::suggest_floating_point_literal
18: 0x7fb1f30678d3 - <rustc_infer[51c380136aeb3624]::infer::InferCtxt as rustc_trait_selection[5f3069b2459f8e16]::traits::error_reporting::InferCtxtExt>::report_selection_error
19: 0x7fb1f306e99b - <rustc_infer[51c380136aeb3624]::infer::InferCtxt as rustc_trait_selection[5f3069b2459f8e16]::traits::error_reporting::InferCtxtPrivExt>::report_fulfillment_error
20: 0x7fb1f3063fed - <rustc_infer[51c380136aeb3624]::infer::InferCtxt as rustc_trait_selection[5f3069b2459f8e16]::traits::error_reporting::InferCtxtExt>::report_fulfillment_errors
21: 0x7fb1f3631109 - <rustc_typeck[db10f2c3c7942d60]::check::fn_ctxt::FnCtxt>::check_overloaded_binop
22: 0x7fb1f3630573 - <rustc_typeck[db10f2c3c7942d60]::check::fn_ctxt::FnCtxt>::check_binop
23: 0x7fb1f363fe3a - <rustc_typeck[db10f2c3c7942d60]::check::fn_ctxt::FnCtxt>::check_expr_kind
24: 0x7fb1f3613c42 - <rustc_typeck[db10f2c3c7942d60]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
25: 0x7fb1f364189b - <rustc_typeck[db10f2c3c7942d60]::check::fn_ctxt::FnCtxt>::check_expr_kind
26: 0x7fb1f3613c42 - <rustc_typeck[db10f2c3c7942d60]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
27: 0x7fb1f362abcd - <rustc_typeck[db10f2c3c7942d60]::check::fn_ctxt::FnCtxt>::check_decl_initializer
28: 0x7fb1f362b2b3 - <rustc_typeck[db10f2c3c7942d60]::check::fn_ctxt::FnCtxt>::check_stmt
29: 0x7fb1f362c80a - <rustc_typeck[db10f2c3c7942d60]::check::fn_ctxt::FnCtxt>::check_block_with_expected
30: 0x7fb1f363f93e - <rustc_typeck[db10f2c3c7942d60]::check::fn_ctxt::FnCtxt>::check_expr_kind
31: 0x7fb1f3613c42 - <rustc_typeck[db10f2c3c7942d60]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
32: 0x7fb1f37395e7 - rustc_typeck[db10f2c3c7942d60]::check::check::check_fn
33: 0x7fb1f36aff1d - <rustc_infer[51c380136aeb3624]::infer::InferCtxtBuilder>::enter::<&rustc_middle[19532489b8feda79]::ty::context::TypeckResults, <rustc_typeck[db10f2c3c7942d60]::check::inherited::InheritedBuilder>::enter<rustc_typeck[db10f2c3c7942d60]::check::typeck_with_fallback<rustc_typeck[db10f2c3c7942d60]::check::typeck::{closure#0}>::{closure#1}, &rustc_middle[19532489b8feda79]::ty::context::TypeckResults>::{closure#0}>
34: 0x7fb1f369706f - rustc_typeck[db10f2c3c7942d60]::check::typeck
35: 0x7fb1f3b51927 - rustc_query_system[a647233426178bb2]::query::plumbing::try_execute_query::<rustc_query_impl[3cc289e3f94f21f9]::plumbing::QueryCtxt, rustc_query_system[a647233426178bb2]::query::caches::DefaultCache<rustc_span[6c07302eb180155a]::def_id::LocalDefId, &rustc_middle[19532489b8feda79]::ty::context::TypeckResults>>
36: 0x7fb1f3c31508 - <rustc_query_impl[3cc289e3f94f21f9]::Queries as rustc_middle[19532489b8feda79]::ty::query::QueryEngine>::typeck
37: 0x7fb1f36f5fdc - <rustc_middle[19532489b8feda79]::hir::map::Map>::par_body_owners::<rustc_typeck[db10f2c3c7942d60]::check::typeck_item_bodies::{closure#0}>
38: 0x7fb1f43875dc - rustc_typeck[db10f2c3c7942d60]::check::typeck_item_bodies
39: 0x7fb1f45cfd97 - rustc_query_system[a647233426178bb2]::query::plumbing::try_execute_query::<rustc_query_impl[3cc289e3f94f21f9]::plumbing::QueryCtxt, rustc_query_system[a647233426178bb2]::query::caches::DefaultCache<(), ()>>
40: 0x7fb1f45f6581 - rustc_query_system[a647233426178bb2]::query::plumbing::get_query::<rustc_query_impl[3cc289e3f94f21f9]::queries::typeck_item_bodies, rustc_query_impl[3cc289e3f94f21f9]::plumbing::QueryCtxt>
41: 0x7fb1f4387ffa - rustc_typeck[db10f2c3c7942d60]::check_crate
42: 0x7fb1f4115327 - rustc_interface[7db59c2ada5b0a19]::passes::analysis
43: 0x7fb1f45c5aae - rustc_query_system[a647233426178bb2]::query::plumbing::try_execute_query::<rustc_query_impl[3cc289e3f94f21f9]::plumbing::QueryCtxt, rustc_query_system[a647233426178bb2]::query::caches::DefaultCache<(), core[8651d86609299ae0]::result::Result<(), rustc_errors[276cb876b2679b12]::ErrorGuaranteed>>>
44: 0x7fb1f4604dee - rustc_query_system[a647233426178bb2]::query::plumbing::get_query::<rustc_query_impl[3cc289e3f94f21f9]::queries::analysis, rustc_query_impl[3cc289e3f94f21f9]::plumbing::QueryCtxt>
45: 0x7fb1f40f32d4 - <rustc_interface[7db59c2ada5b0a19]::passes::QueryContext>::enter::<rustc_driver[49e5c50138067fc5]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[8651d86609299ae0]::result::Result<(), rustc_errors[276cb876b2679b12]::ErrorGuaranteed>>
46: 0x7fb1f40d106a - <rustc_interface[7db59c2ada5b0a19]::interface::Compiler>::enter::<rustc_driver[49e5c50138067fc5]::run_compiler::{closure#1}::{closure#2}, core[8651d86609299ae0]::result::Result<core[8651d86609299ae0]::option::Option<rustc_interface[7db59c2ada5b0a19]::queries::Linker>, rustc_errors[276cb876b2679b12]::ErrorGuaranteed>>
47: 0x7fb1f40e3eaf - rustc_span[6c07302eb180155a]::with_source_map::<core[8651d86609299ae0]::result::Result<(), rustc_errors[276cb876b2679b12]::ErrorGuaranteed>, rustc_interface[7db59c2ada5b0a19]::interface::create_compiler_and_run<core[8651d86609299ae0]::result::Result<(), rustc_errors[276cb876b2679b12]::ErrorGuaranteed>, rustc_driver[49e5c50138067fc5]::run_compiler::{closure#1}>::{closure#1}>
48: 0x7fb1f40d1f54 - rustc_interface[7db59c2ada5b0a19]::interface::create_compiler_and_run::<core[8651d86609299ae0]::result::Result<(), rustc_errors[276cb876b2679b12]::ErrorGuaranteed>, rustc_driver[49e5c50138067fc5]::run_compiler::{closure#1}>
49: 0x7fb1f40cff72 - <scoped_tls[879dbf235dd6e6b5]::ScopedKey<rustc_span[6c07302eb180155a]::SessionGlobals>>::set::<rustc_interface[7db59c2ada5b0a19]::interface::run_compiler<core[8651d86609299ae0]::result::Result<(), rustc_errors[276cb876b2679b12]::ErrorGuaranteed>, rustc_driver[49e5c50138067fc5]::run_compiler::{closure#1}>::{closure#0}, core[8651d86609299ae0]::result::Result<(), rustc_errors[276cb876b2679b12]::ErrorGuaranteed>>
50: 0x7fb1f40ce31f - std[b2e3e412d3925f11]::sys_common::backtrace::_rust_begin_short_backtrace::<rustc_interface[7db59c2ada5b0a19]::util::run_in_thread_pool_with_globals<rustc_interface[7db59c2ada5b0a19]::interface::run_compiler<core[8651d86609299ae0]::result::Result<(), rustc_errors[276cb876b2679b12]::ErrorGuaranteed>, rustc_driver[49e5c50138067fc5]::run_compiler::{closure#1}>::{closure#0}, core[8651d86609299ae0]::result::Result<(), rustc_errors[276cb876b2679b12]::ErrorGuaranteed>>::{closure#0}, core[8651d86609299ae0]::result::Result<(), rustc_errors[276cb876b2679b12]::ErrorGuaranteed>>
51: 0x7fb1f40ce609 - <<std[b2e3e412d3925f11]::thread::Builder>::spawn_unchecked
<rustc_interface[7db59c2ada5b0a19]::util::run_in_thread_pool_with_globals<rustc_interface[7db59c2ada5b0a19]::interface::run_compiler<core[8651d86609299ae0]::result::Result<(), rustc_errors[276cb876b2679b12]::ErrorGuaranteed>, rustc_driver[49e5c50138067fc5]::run_compiler::{closure#1}>::{closure#0}, core[8651d86609299ae0]::result::Result<(), rustc_errors[276cb876b2679b12]::ErrorGuaranteed>>::{closure#0}, core[8651d86609299ae0]::result::Result<(), rustc_errors[276cb876b2679b12]::ErrorGuaranteed>>::{closure#1} as core[8651d86609299ae0]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
52: 0x7fb1f1b0a5b3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once::h1d1829d85b330575
at /rustc/1eb72580d076935a3e590deb6e5813a5aef3eca4/library/alloc/src/boxed.rs:1854:9
53: 0x7fb1f1b0a5b3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once::hceeee2c016bc2d0e
at /rustc/1eb72580d076935a3e590deb6e5813a5aef3eca4/library/alloc/src/boxed.rs:1854:9
54: 0x7fb1f1b0a5b3 - std::sys::unix::thread::Thread::new::thread_start::hed19d3e6063f6837
at /rustc/1eb72580d076935a3e590deb6e5813a5aef3eca4/library/std/src/sys/unix/thread.rs:108:17
55: 0x7fb1f1a3e609 - start_thread
56: 0x7fb1f1957163 - clone
57: 0x0 -

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.61.0-nightly (1eb72580d 2022-03-08) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=1 -C llvm-args=--x86-asm-syntax=intel --crate-type rlib

query stack during panic:
#0 [typeck] type-checking a
#1 [typeck_item_bodies] type-checking all item bodies
#2 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 2 previous errors

Some errors have detailed explanations: E0152, E0277.
For more information about an error, try rustc --explain E0152.
Compiler returned: 101

@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Mar 11, 2022
@Milo123459
Copy link
Contributor

@rustbot claim

@Alexendoo
Copy link
Member

Fixed by #103003

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. glacier ICE tracked in rust-lang/glacier. 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

5 participants