Skip to content

ICE: debug assertions: E0061: suggestion must not have overlapping parts #109831

Closed
@matthiaskrgr

Description

@matthiaskrgr

Code

You need rustc built with debug assertions in order to reproduce this!

struct A;
struct B;

fn f(b1: B, b2: B, a2: C) {}

fn main() {
    f(A, A, B, C);
}

Meta

rustc --version --verbose:

b9535c0b7d64290b27c4a116262402cd12f77833

Error output

error[E0061]: this function takes 3 arguments but 4 arguments were supplied
 --> treereduce.out:7:5
  |
7 |     f(A, A, B, C);
  |     ^ -  -     - unexpected argument
  |       |  |
  |       |  expected `B`, found `A`
  |       expected `B`, found `A`
  |
note: function defined here
 --> treereduce.out:4:4
  |
4 | fn f(b1: B, b2: B, a2: C) {}
  |    ^ -----  -----  -----
help: remove the extra argument
  |
7 -     f(A, A, B, C);
7 +     f(/* B *//* B */, A, B);
  |
Backtrace

error[E0425]: cannot find value `C` in this scope
 --> treereduce.out:7:16
  |
1 | struct A;
  | --------- similarly named unit struct `A` defined here
...
7 |     f(A, A, B, C);
  |                ^ help: a unit struct with a similar name exists: `A`

thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `Some([SubstitutionPart { span: treereduce.out:7:7: 7:8 (#0), snippet: "/* B */" }, SubstitutionPart { span: treereduce.out:7:7: 7:8 (#0), snippet: "/* B */" }])`,
 right: `None`: suggestion must not have overlapping parts', /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_errors/src/diagnostic.rs:632:9
stack backtrace:
   0:     0x7fed52308c14 - std::backtrace_rs::backtrace::libunwind::trace::h67b163ebe8a31594
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fed52308c14 - std::backtrace_rs::backtrace::trace_unsynchronized::h3c8281a1c2f00064
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fed52308c14 - std::sys_common::backtrace::_print_fmt::h06cb971327b8c2e2
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7fed52308c14 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h4ee75b43d657a8f4
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7fed523b96eb - core::fmt::write::h2dac34aae88eac3a
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/fmt/mod.rs:1254:17
   5:     0x7fed5234ccef - std::io::Write::write_fmt::h7ccd79b72628a6b8
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/io/mod.rs:1698:15
   6:     0x7fed52308a15 - std::sys_common::backtrace::_print::hd635497dbec07356
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7fed52308a15 - std::sys_common::backtrace::print::hff530ee89e14fe85
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7fed52333f74 - std::panicking::default_hook::{{closure}}::h4e7fb0c7799d720c
   9:     0x7fed52333bad - std::panicking::default_hook::ha8e4a4f93e8d13cc
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:288:9
  10:     0x7fed54e58ec5 - <alloc[80fd20bfa47e5cbe]::boxed::Box<dyn for<'a, 'b> core[56d2be079082b2f7]::ops::function::Fn<(&'a core[56d2be079082b2f7]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[56d2be079082b2f7]::marker::Send + core[56d2be079082b2f7]::marker::Sync> as core[56d2be079082b2f7]::ops::function::Fn<(&core[56d2be079082b2f7]::panic::panic_info::PanicInfo,)>>::call
                               at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:1990:9
  11:     0x7fed54e58ec5 - rustc_driver_impl[3922376c7e667c84]::DEFAULT_HOOK::{closure#0}::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_driver_impl/src/lib.rs:1188:17
  12:     0x7fed52334761 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h95f03351df89329f
                               at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:1990:9
  13:     0x7fed52334761 - std::panicking::rust_panic_with_hook::hd91c43bc8d7e412b
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:694:13
  14:     0x7fed52309239 - std::panicking::begin_panic_handler::{{closure}}::h42d76a5ff060f351
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:581:13
  15:     0x7fed52308cf6 - std::sys_common::backtrace::__rust_end_short_backtrace::h74d47eee5ac245dc
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:150:18
  16:     0x7fed52334282 - rust_begin_unwind
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:577:5
  17:     0x7fed523e07a3 - core::panicking::panic_fmt::h3d0a8f81bb9ae67d
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/panicking.rs:67:14
  18:     0x7fed523e0e63 - core::panicking::assert_failed_inner::h18c1fdea489b3b69
  19:     0x7fed55521849 - core[56d2be079082b2f7]::panicking::assert_failed::<core[56d2be079082b2f7]::option::Option<&[rustc_errors[b006902e8e5ecbbb]::SubstitutionPart; 2usize]>, core[56d2be079082b2f7]::option::Option<&[rustc_errors[b006902e8e5ecbbb]::SubstitutionPart; 2usize]>>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/panicking.rs:228:5
  20:     0x7fed5566d955 - <rustc_errors[b006902e8e5ecbbb]::diagnostic::Diagnostic>::multipart_suggestion_with_style::<&alloc[80fd20bfa47e5cbe]::string::String>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_errors/src/diagnostic.rs:632:9
  21:     0x7fed554674ba - <rustc_errors[b006902e8e5ecbbb]::diagnostic::Diagnostic>::multipart_suggestion::<&alloc[80fd20bfa47e5cbe]::string::String>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_errors/src/diagnostic.rs:588:9
  22:     0x7fed554674ba - <rustc_errors[b006902e8e5ecbbb]::diagnostic_builder::DiagnosticBuilder<rustc_span[9569648757f2d60c]::ErrorGuaranteed>>::multipart_suggestion::<&alloc[80fd20bfa47e5cbe]::string::String>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_errors/src/diagnostic_builder.rs:481:13
  23:     0x7fed554674ba - <rustc_hir_typeck[d24901ef7ba52e02]::fn_ctxt::FnCtxt>::report_arg_errors
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs:1196:17
  24:     0x7fed55462e2f - <rustc_hir_typeck[d24901ef7ba52e02]::fn_ctxt::FnCtxt>::check_argument_types
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs:453:13
  25:     0x7fed55427142 - <rustc_hir_typeck[d24901ef7ba52e02]::fn_ctxt::FnCtxt>::confirm_builtin_call
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/callee.rs:460:9
  26:     0x7fed55425799 - <rustc_hir_typeck[d24901ef7ba52e02]::fn_ctxt::FnCtxt>::check_call
  27:     0x7fed554bd501 - <rustc_hir_typeck[d24901ef7ba52e02]::fn_ctxt::FnCtxt>::check_expr_kind
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:330:45
  28:     0x7fed554412ec - <rustc_hir_typeck[d24901ef7ba52e02]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:237:18
  29:     0x7fed554412ec - stacker[7d0e6083c51d6934]::maybe_grow::<rustc_middle[ddc0d9627cd9f41e]::ty::Ty, <rustc_hir_typeck[d24901ef7ba52e02]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}>
                               at /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/stacker-0.1.15/src/lib.rs:55:9
  30:     0x7fed554412ec - rustc_data_structures[ff980df7d59f2440]::stack::ensure_sufficient_stack::<rustc_middle[ddc0d9627cd9f41e]::ty::Ty, <rustc_hir_typeck[d24901ef7ba52e02]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_data_structures/src/stack.rs:17:5
  31:     0x7fed554412ec - <rustc_hir_typeck[d24901ef7ba52e02]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:233:18
  32:     0x7fed554bc832 - <rustc_hir_typeck[d24901ef7ba52e02]::fn_ctxt::FnCtxt>::check_expr_with_expectation
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:187:9
  33:     0x7fed5546b23e - <rustc_hir_typeck[d24901ef7ba52e02]::fn_ctxt::FnCtxt>::check_stmt
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs:1468:17
  34:     0x7fed5546b945 - <rustc_hir_typeck[d24901ef7ba52e02]::fn_ctxt::FnCtxt>::check_block_with_expected::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs:1521:17
  35:     0x7fed5546b945 - <rustc_hir_typeck[d24901ef7ba52e02]::fn_ctxt::FnCtxt>::with_breakable_ctxt::<<rustc_hir_typeck[d24901ef7ba52e02]::fn_ctxt::FnCtxt>::check_block_with_expected::{closure#0}, ()>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs:1468:22
  36:     0x7fed5546b945 - <rustc_hir_typeck[d24901ef7ba52e02]::fn_ctxt::FnCtxt>::check_block_with_expected
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs:1519:26
  37:     0x7fed554bd105 - <rustc_hir_typeck[d24901ef7ba52e02]::fn_ctxt::FnCtxt>::check_expr_kind
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:329:41
  38:     0x7fed554412ec - <rustc_hir_typeck[d24901ef7ba52e02]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:237:18
  39:     0x7fed554412ec - stacker[7d0e6083c51d6934]::maybe_grow::<rustc_middle[ddc0d9627cd9f41e]::ty::Ty, <rustc_hir_typeck[d24901ef7ba52e02]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}>
                               at /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/stacker-0.1.15/src/lib.rs:55:9
  40:     0x7fed554412ec - rustc_data_structures[ff980df7d59f2440]::stack::ensure_sufficient_stack::<rustc_middle[ddc0d9627cd9f41e]::ty::Ty, <rustc_hir_typeck[d24901ef7ba52e02]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_data_structures/src/stack.rs:17:5
  41:     0x7fed554412ec - <rustc_hir_typeck[d24901ef7ba52e02]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:233:18
  42:     0x7fed554bc832 - <rustc_hir_typeck[d24901ef7ba52e02]::fn_ctxt::FnCtxt>::check_expr_with_expectation
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:187:9
  43:     0x7fed55443096 - <rustc_hir_typeck[d24901ef7ba52e02]::fn_ctxt::FnCtxt>::check_expr_with_hint
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:139:9
  44:     0x7fed55443096 - <rustc_hir_typeck[d24901ef7ba52e02]::fn_ctxt::FnCtxt>::check_return_expr
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:826:30
  45:     0x7fed5563621a - rustc_hir_typeck[d24901ef7ba52e02]::check::check_fn
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/check.rs:122:9
  46:     0x7fed5566116a - rustc_hir_typeck[d24901ef7ba52e02]::typeck_with_fallback::<rustc_hir_typeck[d24901ef7ba52e02]::typeck::{closure#0}>::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/lib.rs:231:9
  47:     0x7fed5566116a - rustc_hir_typeck[d24901ef7ba52e02]::typeck_with_fallback::<rustc_hir_typeck[d24901ef7ba52e02]::typeck::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/lib.rs:191:36
  48:     0x7fed5566116a - rustc_hir_typeck[d24901ef7ba52e02]::typeck
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/lib.rs:172:9
  49:     0x7fed569c5ebe - <rustc_query_impl[33f66818407d1b0e]::queries::typeck as rustc_query_system[dea804868d3de2b0]::query::config::QueryConfig<rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>>::compute
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_impl/src/plumbing.rs:519:21
  50:     0x7fed569c5ebe - rustc_query_system[dea804868d3de2b0]::query::plumbing::execute_job_non_incr::<rustc_query_impl[33f66818407d1b0e]::queries::typeck, rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_system/src/query/plumbing.rs:443:72
  51:     0x7fed569c5ebe - rustc_middle[ddc0d9627cd9f41e]::ty::context::tls::enter_context::<rustc_query_system[dea804868d3de2b0]::query::plumbing::execute_job_non_incr<rustc_query_impl[33f66818407d1b0e]::queries::typeck, rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>::{closure#0}, &rustc_middle[ddc0d9627cd9f41e]::ty::typeck_results::TypeckResults>::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:82:9
  52:     0x7fed569c5ebe - <std[2f6676e1b2585ce5]::thread::local::LocalKey<core[56d2be079082b2f7]::cell::Cell<*const ()>>>::try_with::<rustc_middle[ddc0d9627cd9f41e]::ty::context::tls::enter_context<rustc_query_system[dea804868d3de2b0]::query::plumbing::execute_job_non_incr<rustc_query_impl[33f66818407d1b0e]::queries::typeck, rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>::{closure#0}, &rustc_middle[ddc0d9627cd9f41e]::ty::typeck_results::TypeckResults>::{closure#0}, &rustc_middle[ddc0d9627cd9f41e]::ty::typeck_results::TypeckResults>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/thread/local.rs:252:16
  53:     0x7fed569c5ebe - <std[2f6676e1b2585ce5]::thread::local::LocalKey<core[56d2be079082b2f7]::cell::Cell<*const ()>>>::with::<rustc_middle[ddc0d9627cd9f41e]::ty::context::tls::enter_context<rustc_query_system[dea804868d3de2b0]::query::plumbing::execute_job_non_incr<rustc_query_impl[33f66818407d1b0e]::queries::typeck, rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>::{closure#0}, &rustc_middle[ddc0d9627cd9f41e]::ty::typeck_results::TypeckResults>::{closure#0}, &rustc_middle[ddc0d9627cd9f41e]::ty::typeck_results::TypeckResults>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/thread/local.rs:228:9
  54:     0x7fed569c5ebe - rustc_middle[ddc0d9627cd9f41e]::ty::context::tls::enter_context::<rustc_query_system[dea804868d3de2b0]::query::plumbing::execute_job_non_incr<rustc_query_impl[33f66818407d1b0e]::queries::typeck, rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>::{closure#0}, &rustc_middle[ddc0d9627cd9f41e]::ty::typeck_results::TypeckResults>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:79:5
  55:     0x7fed569c5ebe - <rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt as rustc_query_system[dea804868d3de2b0]::query::QueryContext>::start_query::<&rustc_middle[ddc0d9627cd9f41e]::ty::typeck_results::TypeckResults, rustc_query_system[dea804868d3de2b0]::query::plumbing::execute_job_non_incr<rustc_query_impl[33f66818407d1b0e]::queries::typeck, rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>::{closure#0}>::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_impl/src/plumbing.rs:127:13
  56:     0x7fed569c5ebe - rustc_middle[ddc0d9627cd9f41e]::ty::context::tls::with_related_context::<<rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt as rustc_query_system[dea804868d3de2b0]::query::QueryContext>::start_query<&rustc_middle[ddc0d9627cd9f41e]::ty::typeck_results::TypeckResults, rustc_query_system[dea804868d3de2b0]::query::plumbing::execute_job_non_incr<rustc_query_impl[33f66818407d1b0e]::queries::typeck, rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>::{closure#0}>::{closure#0}, &rustc_middle[ddc0d9627cd9f41e]::ty::typeck_results::TypeckResults>::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:133:9
  57:     0x7fed569c5ebe - rustc_middle[ddc0d9627cd9f41e]::ty::context::tls::with_context::<rustc_middle[ddc0d9627cd9f41e]::ty::context::tls::with_related_context<<rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt as rustc_query_system[dea804868d3de2b0]::query::QueryContext>::start_query<&rustc_middle[ddc0d9627cd9f41e]::ty::typeck_results::TypeckResults, rustc_query_system[dea804868d3de2b0]::query::plumbing::execute_job_non_incr<rustc_query_impl[33f66818407d1b0e]::queries::typeck, rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>::{closure#0}>::{closure#0}, &rustc_middle[ddc0d9627cd9f41e]::ty::typeck_results::TypeckResults>::{closure#0}, &rustc_middle[ddc0d9627cd9f41e]::ty::typeck_results::TypeckResults>::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:111:36
  58:     0x7fed569c5ebe - rustc_middle[ddc0d9627cd9f41e]::ty::context::tls::with_context_opt::<rustc_middle[ddc0d9627cd9f41e]::ty::context::tls::with_context<rustc_middle[ddc0d9627cd9f41e]::ty::context::tls::with_related_context<<rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt as rustc_query_system[dea804868d3de2b0]::query::QueryContext>::start_query<&rustc_middle[ddc0d9627cd9f41e]::ty::typeck_results::TypeckResults, rustc_query_system[dea804868d3de2b0]::query::plumbing::execute_job_non_incr<rustc_query_impl[33f66818407d1b0e]::queries::typeck, rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>::{closure#0}>::{closure#0}, &rustc_middle[ddc0d9627cd9f41e]::ty::typeck_results::TypeckResults>::{closure#0}, &rustc_middle[ddc0d9627cd9f41e]::ty::typeck_results::TypeckResults>::{closure#0}, &rustc_middle[ddc0d9627cd9f41e]::ty::typeck_results::TypeckResults>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:100:18
  59:     0x7fed569c5ebe - rustc_middle[ddc0d9627cd9f41e]::ty::context::tls::with_context::<rustc_middle[ddc0d9627cd9f41e]::ty::context::tls::with_related_context<<rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt as rustc_query_system[dea804868d3de2b0]::query::QueryContext>::start_query<&rustc_middle[ddc0d9627cd9f41e]::ty::typeck_results::TypeckResults, rustc_query_system[dea804868d3de2b0]::query::plumbing::execute_job_non_incr<rustc_query_impl[33f66818407d1b0e]::queries::typeck, rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>::{closure#0}>::{closure#0}, &rustc_middle[ddc0d9627cd9f41e]::ty::typeck_results::TypeckResults>::{closure#0}, &rustc_middle[ddc0d9627cd9f41e]::ty::typeck_results::TypeckResults>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:111:5
  60:     0x7fed569c5ebe - rustc_middle[ddc0d9627cd9f41e]::ty::context::tls::with_related_context::<<rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt as rustc_query_system[dea804868d3de2b0]::query::QueryContext>::start_query<&rustc_middle[ddc0d9627cd9f41e]::ty::typeck_results::TypeckResults, rustc_query_system[dea804868d3de2b0]::query::plumbing::execute_job_non_incr<rustc_query_impl[33f66818407d1b0e]::queries::typeck, rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>::{closure#0}>::{closure#0}, &rustc_middle[ddc0d9627cd9f41e]::ty::typeck_results::TypeckResults>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:124:5
  61:     0x7fed569c5ebe - <rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt as rustc_query_system[dea804868d3de2b0]::query::QueryContext>::start_query::<&rustc_middle[ddc0d9627cd9f41e]::ty::typeck_results::TypeckResults, rustc_query_system[dea804868d3de2b0]::query::plumbing::execute_job_non_incr<rustc_query_impl[33f66818407d1b0e]::queries::typeck, rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_impl/src/plumbing.rs:112:9
  62:     0x7fed569c5ebe - rustc_query_system[dea804868d3de2b0]::query::plumbing::execute_job_non_incr::<rustc_query_impl[33f66818407d1b0e]::queries::typeck, rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_system/src/query/plumbing.rs:443:18
  63:     0x7fed569c5ebe - rustc_query_system[dea804868d3de2b0]::query::plumbing::execute_job::<rustc_query_impl[33f66818407d1b0e]::queries::typeck, rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_system/src/query/plumbing.rs:401:17
  64:     0x7fed569c5ebe - rustc_query_system[dea804868d3de2b0]::query::plumbing::try_execute_query::<rustc_query_impl[33f66818407d1b0e]::queries::typeck, rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_system/src/query/plumbing.rs:357:13
  65:     0x7fed56bfed05 - rustc_query_system[dea804868d3de2b0]::query::plumbing::get_query::<rustc_query_impl[33f66818407d1b0e]::queries::typeck, rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_system/src/query/plumbing.rs:800:36
  66:     0x7fed56bfed05 - stacker[7d0e6083c51d6934]::maybe_grow::<(&rustc_middle[ddc0d9627cd9f41e]::ty::typeck_results::TypeckResults, core[56d2be079082b2f7]::option::Option<rustc_query_system[dea804868d3de2b0]::dep_graph::graph::DepNodeIndex>), rustc_query_system[dea804868d3de2b0]::query::plumbing::get_query<rustc_query_impl[33f66818407d1b0e]::queries::typeck, rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>::{closure#0}>
                               at /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/stacker-0.1.15/src/lib.rs:55:9
  67:     0x7fed56bfed05 - rustc_data_structures[ff980df7d59f2440]::stack::ensure_sufficient_stack::<(&rustc_middle[ddc0d9627cd9f41e]::ty::typeck_results::TypeckResults, core[56d2be079082b2f7]::option::Option<rustc_query_system[dea804868d3de2b0]::dep_graph::graph::DepNodeIndex>), rustc_query_system[dea804868d3de2b0]::query::plumbing::get_query<rustc_query_impl[33f66818407d1b0e]::queries::typeck, rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_data_structures/src/stack.rs:17:5
  68:     0x7fed56bfed05 - rustc_query_system[dea804868d3de2b0]::query::plumbing::get_query::<rustc_query_impl[33f66818407d1b0e]::queries::typeck, rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_system/src/query/plumbing.rs:800:9
  69:     0x7fed56bfed05 - <rustc_query_impl[33f66818407d1b0e]::Queries as rustc_middle[ddc0d9627cd9f41e]::ty::query::QueryEngine>::typeck::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_impl/src/plumbing.rs:805:17
  70:     0x7fed56bfed05 - <rustc_query_impl[33f66818407d1b0e]::Queries as rustc_middle[ddc0d9627cd9f41e]::ty::query::QueryEngine>::typeck
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_impl/src/lib.rs:46:1
  71:     0x7fed556ca3b4 - <rustc_middle[ddc0d9627cd9f41e]::ty::query::TyCtxtEnsure>::typeck::<rustc_span[9569648757f2d60c]::def_id::LocalDefId>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/query.rs:351:29
  72:     0x7fed556ca3b4 - rustc_hir_typeck[d24901ef7ba52e02]::typeck_item_bodies::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/lib.rs:156:64
  73:     0x7fed556ca3b4 - <rustc_middle[ddc0d9627cd9f41e]::hir::map::Map>::par_body_owners::<rustc_hir_typeck[d24901ef7ba52e02]::typeck_item_bodies::{closure#0}>::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/hir/map/mod.rs:492:82
  74:     0x7fed556ca3b4 - rustc_data_structures[ff980df7d59f2440]::sync::par_for_each_in::<&[rustc_span[9569648757f2d60c]::def_id::LocalDefId], <rustc_middle[ddc0d9627cd9f41e]::hir::map::Map>::par_body_owners<rustc_hir_typeck[d24901ef7ba52e02]::typeck_item_bodies::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_data_structures/src/sync.rs:181:66
  75:     0x7fed556ca3b4 - <core[56d2be079082b2f7]::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures[ff980df7d59f2440]::sync::par_for_each_in<&[rustc_span[9569648757f2d60c]::def_id::LocalDefId], <rustc_middle[ddc0d9627cd9f41e]::hir::map::Map>::par_body_owners<rustc_hir_typeck[d24901ef7ba52e02]::typeck_item_bodies::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}> as core[56d2be079082b2f7]::ops::function::FnOnce<()>>::call_once
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/panic/unwind_safe.rs:271:9
  76:     0x7fed556ca3b4 - std[2f6676e1b2585ce5]::panicking::try::do_call::<core[56d2be079082b2f7]::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures[ff980df7d59f2440]::sync::par_for_each_in<&[rustc_span[9569648757f2d60c]::def_id::LocalDefId], <rustc_middle[ddc0d9627cd9f41e]::hir::map::Map>::par_body_owners<rustc_hir_typeck[d24901ef7ba52e02]::typeck_item_bodies::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}>, ()>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:485:40
  77:     0x7fed556ca3b4 - std[2f6676e1b2585ce5]::panicking::try::<(), core[56d2be079082b2f7]::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures[ff980df7d59f2440]::sync::par_for_each_in<&[rustc_span[9569648757f2d60c]::def_id::LocalDefId], <rustc_middle[ddc0d9627cd9f41e]::hir::map::Map>::par_body_owners<rustc_hir_typeck[d24901ef7ba52e02]::typeck_item_bodies::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}>>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:449:19
  78:     0x7fed5558ee98 - std[2f6676e1b2585ce5]::panic::catch_unwind::<core[56d2be079082b2f7]::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures[ff980df7d59f2440]::sync::par_for_each_in<&[rustc_span[9569648757f2d60c]::def_id::LocalDefId], <rustc_middle[ddc0d9627cd9f41e]::hir::map::Map>::par_body_owners<rustc_hir_typeck[d24901ef7ba52e02]::typeck_item_bodies::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}>, ()>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panic.rs:140:14
  79:     0x7fed5558ee98 - rustc_data_structures[ff980df7d59f2440]::sync::par_for_each_in::<&[rustc_span[9569648757f2d60c]::def_id::LocalDefId], <rustc_middle[ddc0d9627cd9f41e]::hir::map::Map>::par_body_owners<rustc_hir_typeck[d24901ef7ba52e02]::typeck_item_bodies::{closure#0}>::{closure#0}>::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_data_structures/src/sync.rs:181:33
  80:     0x7fed5558ee98 - <core[56d2be079082b2f7]::slice::iter::Iter<rustc_span[9569648757f2d60c]::def_id::LocalDefId> as core[56d2be079082b2f7]::iter::traits::iterator::Iterator>::for_each::<rustc_data_structures[ff980df7d59f2440]::sync::par_for_each_in<&[rustc_span[9569648757f2d60c]::def_id::LocalDefId], <rustc_middle[ddc0d9627cd9f41e]::hir::map::Map>::par_body_owners<rustc_hir_typeck[d24901ef7ba52e02]::typeck_item_bodies::{closure#0}>::{closure#0}>::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/slice/iter/macros.rs:201:21
  81:     0x7fed5558ee98 - rustc_data_structures[ff980df7d59f2440]::sync::par_for_each_in::<&[rustc_span[9569648757f2d60c]::def_id::LocalDefId], <rustc_middle[ddc0d9627cd9f41e]::hir::map::Map>::par_body_owners<rustc_hir_typeck[d24901ef7ba52e02]::typeck_item_bodies::{closure#0}>::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_data_structures/src/sync.rs:180:13
  82:     0x7fed5565dfb3 - <rustc_middle[ddc0d9627cd9f41e]::hir::map::Map>::par_body_owners::<rustc_hir_typeck[d24901ef7ba52e02]::typeck_item_bodies::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/hir/map/mod.rs:492:9
  83:     0x7fed5565dfb3 - rustc_hir_typeck[d24901ef7ba52e02]::typeck_item_bodies
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/lib.rs:156:5
  84:     0x7fed56955a8e - <rustc_query_impl[33f66818407d1b0e]::queries::typeck_item_bodies as rustc_query_system[dea804868d3de2b0]::query::config::QueryConfig<rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>>::compute
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_impl/src/plumbing.rs:519:21
  85:     0x7fed56955a8e - rustc_query_system[dea804868d3de2b0]::query::plumbing::execute_job_non_incr::<rustc_query_impl[33f66818407d1b0e]::queries::typeck_item_bodies, rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_system/src/query/plumbing.rs:443:72
  86:     0x7fed56955a8e - rustc_middle[ddc0d9627cd9f41e]::ty::context::tls::enter_context::<rustc_query_system[dea804868d3de2b0]::query::plumbing::execute_job_non_incr<rustc_query_impl[33f66818407d1b0e]::queries::typeck_item_bodies, rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>::{closure#0}, ()>::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:82:9
  87:     0x7fed56955a8e - <std[2f6676e1b2585ce5]::thread::local::LocalKey<core[56d2be079082b2f7]::cell::Cell<*const ()>>>::try_with::<rustc_middle[ddc0d9627cd9f41e]::ty::context::tls::enter_context<rustc_query_system[dea804868d3de2b0]::query::plumbing::execute_job_non_incr<rustc_query_impl[33f66818407d1b0e]::queries::typeck_item_bodies, rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>::{closure#0}, ()>::{closure#0}, ()>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/thread/local.rs:252:16
  88:     0x7fed56955a8e - <std[2f6676e1b2585ce5]::thread::local::LocalKey<core[56d2be079082b2f7]::cell::Cell<*const ()>>>::with::<rustc_middle[ddc0d9627cd9f41e]::ty::context::tls::enter_context<rustc_query_system[dea804868d3de2b0]::query::plumbing::execute_job_non_incr<rustc_query_impl[33f66818407d1b0e]::queries::typeck_item_bodies, rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>::{closure#0}, ()>::{closure#0}, ()>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/thread/local.rs:228:9
  89:     0x7fed56955a8e - rustc_middle[ddc0d9627cd9f41e]::ty::context::tls::enter_context::<rustc_query_system[dea804868d3de2b0]::query::plumbing::execute_job_non_incr<rustc_query_impl[33f66818407d1b0e]::queries::typeck_item_bodies, rustc_query_impl[33f66818407d1b0e]::plumbing::QueryCtxt>::{closure#0}, ()>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:79:5
  <snip>

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.70.0-dev running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [typeck] type-checking `main`
#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: E0412, E0425.
For more information about an error, try `rustc --explain E0412`.

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.requires-debug-assertionsThis issue requires a build of rustc or tooling with debug-assertions in some way

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions