Skip to content

debug ice: failed to remove lifetime from suggestion #112503

Closed
@matthiaskrgr

Description

@matthiaskrgr

Code

I think we are trying to remove the &'a borrow from fn values(&'a self) -> Self::Values; here but somehow do not end doing anything at all?

#![crate_type="lib"]

pub trait Insertable {
    type Values;

    fn values(&'a self) -> Self::Values;
}

impl<T> Insertable for Option<T> {
    fn values(self) -> Self::Values {
        self.map(Insertable::values).unwrap_or_default()
    }
}

Meta

rustc --version --verbose:

rustc 1.72.0-nightly (43062c43d 2023-06-09)
binary: rustc
commit-hash: 43062c43d2a63cf4e261c6eddc417575c4f3062f
commit-date: 2023-06-09
host: x86_64-unknown-linux-gnu
release: 1.72.0-nightly
LLVM version: 16.0.5

Error output

error[E0261]: use of undeclared lifetime name `'a`
 --> treereduce.out:6:16
  |
6 |     fn values(&'a self) -> Self::Values;
  |                ^^ undeclared lifetime
  |
help: consider introducing lifetime `'a` here
  |
6 |     fn values<'a>(&'a self) -> Self::Values;
  |              ++++
help: consider introducing lifetime `'a` here
  |
3 | pub trait Insertable<'a> {
  |                     ++++

error[E0046]: not all trait items implemented, missing: `Values`
 --> treereduce.out:9:1
  |
4 |     type Values;
  |     ----------- `Values` from trait
...
9 | impl<T> Insertable for Option<T> {
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Values` in implementation

error[E0631]: type mismatch in function arguments
    --> treereduce.out:11:18
     |
6    |     fn values(&'a self) -> Self::Values;
     |     ------------------------------------ found signature defined here
...
11   |         self.map(Insertable::values).unwrap_or_default()
     |              --- ^^^^^^^^^^^^^^^^^^ expected due to this
     |              |
     |              required by a bound introduced by this call
     |
     = note: expected function signature `fn(T) -> _`
                found function signature `fn(&_) -> _`
note: required by a bound in `Option::<T>::map`
    --> /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:1072:12
     |
1070 |     pub fn map<U, F>(self, f: F) -> Option<U>
     |            --- required by a bound in this associated function
1071 |     where
1072 |         F: FnOnce(T) -> U,
     |            ^^^^^^^^^^^^^^ required by this bound in `Option::<T>::map`
help: do not borrow the argument
     |
6    |     fn values(&'a self) -> Self::Values;
     |

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0046, E0261, E0631.
For more information about an error, try `rustc --explain E0046`.
Backtrace

thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `Some(SubstitutionPart { span: treereduce.out:6:15: 6:15 (#0), snippet: "" })`,
 right: `None`: Span must not be empty and have no suggestion', /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_errors/src/diagnostic.rs:623:9
stack backtrace:
   0:     0x7f4dbb4f05f6 - trace
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f4dbb4f05f6 - trace_unsynchronized<std::sys_common::backtrace::_print_fmt::{closure_env#1}>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f4dbb4f05f6 - _print_fmt
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f4dbb4f05f6 - fmt
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f4dbb53cf08 - fmt
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/fmt/rt.rs:138:9
   5:     0x7f4dbb53cf08 - write
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/fmt/mod.rs:1094:21
   6:     0x7f4dbb4a98cf - write_fmt<std::sys::unix::stdio::Stderr>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/io/mod.rs:1713:15
   7:     0x7f4dbb4f03f5 - _print
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f4dbb4f03f5 - print
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f4dbb4c93ac - {closure#1}
  10:     0x7f4dbb4c9071 - default_hook
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:288:9
  11:     0x7f4dbce8d1cb - call<(&core::panic::panic_info::PanicInfo), (dyn core::ops::function::Fn<(&core::panic::panic_info::PanicInfo), Output=()> + core::marker::Send + core::marker::Sync), alloc::alloc::Global>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:1999:9
  12:     0x7f4dbce8d1cb - {closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_driver_impl/src/lib.rs:1281:13
  13:     0x7f4dbb4c9b95 - call<(&core::panic::panic_info::PanicInfo), (dyn core::ops::function::Fn<(&core::panic::panic_info::PanicInfo), Output=()> + core::marker::Send + core::marker::Sync), alloc::alloc::Global>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:1999:9
  14:     0x7f4dbb4c9b95 - rust_panic_with_hook
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:709:13
  15:     0x7f4dbb4f0907 - {closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:597:13
  16:     0x7f4dbb4f06d6 - __rust_end_short_backtrace<std::panicking::begin_panic_handler::{closure_env#0}, !>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:151:18
  17:     0x7f4dbb4c9702 - begin_panic_handler
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:593:5
  18:     0x7f4dbb47e143 - panic_fmt
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/panicking.rs:67:14
  19:     0x7f4dbb47e6bb - assert_failed_inner
  20:     0x7f4dbbf29a49 - core[b962eb8751e8bda6]::panicking::assert_failed::<core[b962eb8751e8bda6]::option::Option<&rustc_errors[b6f6d948a016dba6]::SubstitutionPart>, core[b962eb8751e8bda6]::option::Option<&rustc_errors[b6f6d948a016dba6]::SubstitutionPart>>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/panicking.rs:228:5
  21:     0x7f4dbf0c5c96 - multipart_suggestion_with_style<&str>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_errors/src/diagnostic.rs:623:9
  22:     0x7f4dbf0eda99 - multipart_suggestion_verbose<&str>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_errors/src/diagnostic.rs:600:9
  23:     0x7f4dbf0eda99 - hint_missing_borrow
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs:3984:13
  24:     0x7f4dbf112648 - report_closure_arg_mismatch
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs:1985:13
  25:     0x7f4dbf12c1a2 - report_type_parameter_mismatch_error
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs:3240:17
  26:     0x7f4dbf121529 - report_selection_error
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs:1129:23
  27:     0x7f4dbf13361f - report_fulfillment_error
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs:1520:17
  28:     0x7f4dbf11f825 - report_fulfillment_errors
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs:470:21
  29:     0x7f4dbd464ca9 - select_obligations_where_possible<rustc_hir_typeck::fn_ctxt::checks::{impl#0}::check_argument_types::{closure_env#1}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs:601:13
  30:     0x7f4dbd464ca9 - check_argument_types
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs:343:17
  31:     0x7f4dbd464211 - check_method_argument_types
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs:128:9
  32:     0x7f4dbd4c0f57 - check_method_call
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:1256:9
  33:     0x7f4dbd4c0f57 - check_expr_kind
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:338:17
  34:     0x7f4dbd43f945 - {closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:240:18
  35:     0x7f4dbd43f945 - maybe_grow<rustc_middle::ty::Ty, rustc_hir_typeck::expr::{impl#0}::check_expr_with_expectation_and_args::{closure_env#0}>
                               at /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stacker-0.1.15/src/lib.rs:55:9
  36:     0x7f4dbd43f945 - ensure_sufficient_stack<rustc_middle::ty::Ty, rustc_hir_typeck::expr::{impl#0}::check_expr_with_expectation_and_args::{closure_env#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_data_structures/src/stack.rs:17:5
  37:     0x7f4dbd43f945 - check_expr_with_expectation_and_args
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:236:18
  38:     0x7f4dbd4bd183 - check_expr_with_expectation
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:190:9
  39:     0x7f4dbd4bea07 - check_expr
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:163:9
  40:     0x7f4dbd4bea07 - check_method_call
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:1223:22
  41:     0x7f4dbd4bea07 - check_expr_kind
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:338:17
  42:     0x7f4dbd43f945 - {closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:240:18
  43:     0x7f4dbd43f945 - maybe_grow<rustc_middle::ty::Ty, rustc_hir_typeck::expr::{impl#0}::check_expr_with_expectation_and_args::{closure_env#0}>
                               at /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stacker-0.1.15/src/lib.rs:55:9
  44:     0x7f4dbd43f945 - ensure_sufficient_stack<rustc_middle::ty::Ty, rustc_hir_typeck::expr::{impl#0}::check_expr_with_expectation_and_args::{closure_env#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_data_structures/src/stack.rs:17:5
  45:     0x7f4dbd43f945 - check_expr_with_expectation_and_args
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:236:18
  46:     0x7f4dbd4bd183 - check_expr_with_expectation
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:190:9
  47:     0x7f4dbd46e7ae - {closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs:1559:44
  48:     0x7f4dbd46e7ae - map<&rustc_hir::hir::Expr, (&rustc_hir::hir::Expr, rustc_middle::ty::Ty), rustc_hir_typeck::fn_ctxt::checks::{impl#0}::check_block_with_expected::{closure#0}::{closure_env#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/option.rs:1075:29
  49:     0x7f4dbd46e7ae - {closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs:1559:26
  50:     0x7f4dbd46e7ae - with_breakable_ctxt<rustc_hir_typeck::fn_ctxt::checks::{impl#0}::check_block_with_expected::{closure_env#0}, ()>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs:1523:22
  51:     0x7f4dbd46e7ae - check_block_with_expected
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs:1551:26
  52:     0x7f4dbd4be5b2 - check_expr_kind
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:335:41
  53:     0x7f4dbd43f945 - {closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:240:18
  54:     0x7f4dbd43f945 - maybe_grow<rustc_middle::ty::Ty, rustc_hir_typeck::expr::{impl#0}::check_expr_with_expectation_and_args::{closure_env#0}>
                               at /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stacker-0.1.15/src/lib.rs:55:9
  55:     0x7f4dbd43f945 - ensure_sufficient_stack<rustc_middle::ty::Ty, rustc_hir_typeck::expr::{impl#0}::check_expr_with_expectation_and_args::{closure_env#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_data_structures/src/stack.rs:17:5
  56:     0x7f4dbd43f945 - check_expr_with_expectation_and_args
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:236:18
  57:     0x7f4dbd4bd183 - check_expr_with_expectation
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:190:9
  58:     0x7f4dbd4416ef - check_expr_with_hint
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:142:9
  59:     0x7f4dbd4416ef - check_return_expr
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:830:30
  60:     0x7f4dbd65e03d - check_fn
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/check.rs:120:5
  61:     0x7f4dbd51b924 - {closure#0}<rustc_hir_typeck::typeck::{closure_env#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/lib.rs:215:9
  62:     0x7f4dbd51b924 - typeck_with_fallback<rustc_hir_typeck::typeck::{closure_env#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/lib.rs:175:36
  63:     0x7f4dbd51b924 - typeck
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/lib.rs:157:5
  64:     0x7f4dbeb2dffc - {closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_impl/src/plumbing.rs:577:33
  65:     0x7f4dbeb2dffc - __rust_begin_short_backtrace<rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2}::{closure_env#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_impl/src/plumbing.rs:506:18
  66:     0x7f4dbeaf4d5c - {closure#2}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_impl/src/plumbing.rs:574:25
  67:     0x7f4dbeaf4d5c - call_once<rustc_query_impl::query_impl::typeck::dynamic_query::{closure_env#2}, (rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId)>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/ops/function.rs:250:5
  68:     0x7f4dbe940b66 - compute<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_impl/src/lib.rs:116:9
  69:     0x7f4dbe940b66 - {closure#0}<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>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_system/src/query/plumbing.rs:487:72
  70:     0x7f4dbe940b66 - {closure#0}<rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<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>, rustc_middle::query::erase::Erased<[u8; 8]>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:82:9
  71:     0x7f4dbe940b66 - try_with<core::cell::Cell<*const ()>, rustc_middle::ty::context::tls::enter_context::{closure_env#0}<rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<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>, rustc_middle::query::erase::Erased<[u8; 8]>>, rustc_middle::query::erase::Erased<[u8; 8]>>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/thread/local.rs:270:16
  72:     0x7f4dbe940b66 - with<core::cell::Cell<*const ()>, rustc_middle::ty::context::tls::enter_context::{closure_env#0}<rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<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>, rustc_middle::query::erase::Erased<[u8; 8]>>, rustc_middle::query::erase::Erased<[u8; 8]>>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/thread/local.rs:246:9
  73:     0x7f4dbe940b66 - enter_context<rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<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>, rustc_middle::query::erase::Erased<[u8; 8]>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:79:9
  74:     0x7f4dbe940b66 - {closure#0}<rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<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>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_impl/src/plumbing.rs:149:13
  75:     0x7f4dbe940b66 - {closure#0}<rustc_query_impl::plumbing::{impl#3}::start_query::{closure_env#0}<rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<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>>, rustc_middle::query::erase::Erased<[u8; 8]>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:133:9
  76:     0x7f4dbe940b66 - {closure#0}<rustc_middle::ty::context::tls::with_related_context::{closure_env#0}<rustc_query_impl::plumbing::{impl#3}::start_query::{closure_env#0}<rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<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>>, rustc_middle::query::erase::Erased<[u8; 8]>>, rustc_middle::query::erase::Erased<[u8; 8]>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:111:36
  77:     0x7f4dbe940b66 - with_context_opt<rustc_middle::ty::context::tls::with_context::{closure_env#0}<rustc_middle::ty::context::tls::with_related_context::{closure_env#0}<rustc_query_impl::plumbing::{impl#3}::start_query::{closure_env#0}<rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<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>>, rustc_middle::query::erase::Erased<[u8; 8]>>, rustc_middle::query::erase::Erased<[u8; 8]>>, rustc_middle::query::erase::Erased<[u8; 8]>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:100:18
  78:     0x7f4dbe940b66 - with_context<rustc_middle::ty::context::tls::with_related_context::{closure_env#0}<rustc_query_impl::plumbing::{impl#3}::start_query::{closure_env#0}<rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<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>>, rustc_middle::query::erase::Erased<[u8; 8]>>, rustc_middle::query::erase::Erased<[u8; 8]>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:111:5
  79:     0x7f4dbe940b66 - with_related_context<rustc_query_impl::plumbing::{impl#3}::start_query::{closure_env#0}<rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<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>>, rustc_middle::query::erase::Erased<[u8; 8]>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:124:5
  80:     0x7f4dbe940b66 - start_query<rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<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>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_impl/src/plumbing.rs:134:9
  81:     0x7f4dbe940b66 - execute_job_non_incr<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>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_system/src/query/plumbing.rs:487:18
  82:     0x7f4dbe940b66 - execute_job<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, false>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_system/src/query/plumbing.rs:420:9
  83:     0x7f4dbe940b66 - 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, false>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_system/src/query/plumbing.rs:365:13
  84:     0x7f4dbe9ecbc6 - {closure#0}<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>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_system/src/query/plumbing.rs:817:32
  85:     0x7f4dbe9ecbc6 - maybe_grow<rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::query::plumbing::get_query_non_incr::{closure_env#0}<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>>
                               at /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stacker-0.1.15/src/lib.rs:55:9
  86:     0x7f4dbe9ecbc6 - ensure_sufficient_stack<rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::query::plumbing::get_query_non_incr::{closure_env#0}<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>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_data_structures/src/stack.rs:17:5
  87:     0x7f4dbe9ecbc6 - get_query_non_incr<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>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_system/src/query/plumbing.rs:817:5
  88:     0x7f4dbe9ecbc6 - __rust_end_short_backtrace
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_impl/src/plumbing.rs:554:26
  89:     0x7f4dbd4f4730 - query_get_at<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/query/plumbing.rs:155:17
  90:     0x7f4dbd51aef2 - typeck<rustc_span::def_id::LocalDefId>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/query/mod.rs:2188:1
  91:     0x7f4dbd51aef2 - typeck<rustc_span::def_id::LocalDefId>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/query/plumbing.rs:376:35
  92:     0x7f4dbd51aef2 - used_trait_imports
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/lib.rs:152:11
  93:     0x7f4dbeb2bdfc - {closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_impl/src/plumbing.rs:577:33
  94:     0x7f4dbeb2bdfc - __rust_begin_short_backtrace<rustc_query_impl::query_impl::used_trait_imports::dynamic_query::{closure#2}::{closure_env#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_impl/src/plumbing.rs:506:18
  95:     0x7f4dbeaf024c - {closure#2}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_impl/src/plumbing.rs:574:25
  96:     0x7f4dbeaf024c - call_once<rustc_query_impl::query_impl::used_trait_imports::dynamic_query::{closure_env#2}, (rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId)>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/ops/function.rs:250:5
  97:     0x7f4dbe940b66 - compute<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_impl/src/lib.rs:116:9
  98:     0x7f4dbe940b66 - {closure#0}<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>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_system/src/query/plumbing.rs:487:72
  99:     0x7f4dbe940b66 - {closure#0}<rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<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>, rustc_middle::query::erase::Erased<[u8; 8]>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:82:9
 100:     0x7f4dbe940b66 - try_with<core::cell::Cell<*const ()>, rustc_middle::ty::context::tls::enter_context::{closure_env#0}<rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<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>, rustc_middle::query::erase::Erased<[u8; 8]>>, rustc_middle::query::erase::Erased<[u8; 8]>>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/thread/local.rs:270:16
 101:     0x7f4dbe940b66 - with<core::cell::Cell<*const ()>, rustc_middle::ty::context::tls::enter_context::{closure_env#0}<rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<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>, rustc_middle::query::erase::Erased<[u8; 8]>>, rustc_middle::query::erase::Erased<[u8; 8]>>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/thread/local.rs:246:9
 102:     0x7f4dbe940b66 - enter_context<rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<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>, rustc_middle::query::erase::Erased<[u8; 8]>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:79:9
 103:     0x7f4dbe940b66 - {closure#0}<rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<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>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_impl/src/plumbing.rs:149:13
 104:     0x7f4dbe940b66 - {closure#0}<rustc_query_impl::plumbing::{impl#3}::start_query::{closure_env#0}<rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<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>>, rustc_middle::query::erase::Erased<[u8; 8]>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:133:9
 105:     0x7f4dbe940b66 - {closure#0}<rustc_middle::ty::context::tls::with_related_context::{closure_env#0}<rustc_query_impl::plumbing::{impl#3}::start_query::{closure_env#0}<rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<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>>, rustc_middle::query::erase::Erased<[u8; 8]>>, rustc_middle::query::erase::Erased<[u8; 8]>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:111:36
 106:     0x7f4dbe940b66 - with_context_opt<rustc_middle::ty::context::tls::with_context::{closure_env#0}<rustc_middle::ty::context::tls::with_related_context::{closure_env#0}<rustc_query_impl::plumbing::{impl#3}::start_query::{closure_env#0}<rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<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>>, rustc_middle::query::erase::Erased<[u8; 8]>>, rustc_middle::query::erase::Erased<[u8; 8]>>, rustc_middle::query::erase::Erased<[u8; 8]>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:100:18
 107:     0x7f4dbe940b66 - with_context<rustc_middle::ty::context::tls::with_related_context::{closure_env#0}<rustc_query_impl::plumbing::{impl#3}::start_query::{closure_env#0}<rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<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>>, rustc_middle::query::erase::Erased<[u8; 8]>>, rustc_middle::query::erase::Erased<[u8; 8]>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:111:5
 108:     0x7f4dbe940b66 - with_related_context<rustc_query_impl::plumbing::{impl#3}::start_query::{closure_env#0}<rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<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>>, rustc_middle::query::erase::Erased<[u8; 8]>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:124:5
 109:     0x7f4dbe940b66 - start_query<rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::query::plumbing::execute_job_non_incr::{closure_env#0}<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>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_impl/src/plumbing.rs:134:9
 110:     0x7f4dbe940b66 - execute_job_non_incr<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>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_system/src/query/plumbing.rs:487:18
 111:     0x7f4dbe940b66 - execute_job<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, false>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_system/src/query/plumbing.rs:420:9
 112:     0x7f4dbe940b66 - 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, false>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_system/src/query/plumbing.rs:365:13
 113:     0x7f4dbe9ecf26 - {closure#0}<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>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_system/src/query/plumbing.rs:817:32


.....

/mod.rs:528:30
 175:     0x7f4dbcea0865 - call_once<std::thread::{impl#0}::spawn_unchecked_::{closure_env#1}<rustc_interface::util::run_in_thread_pool_with_globals::{closure#0}::{closure_env#0}<rustc_interface::interface::run_compiler::{closure_env#0}<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure_env#1}>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, ()>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/ops/function.rs:250:5
 176:     0x7f4dbb49cf5a - call_once<(), dyn core::ops::function::FnOnce<(), Output=()>, alloc::alloc::Global>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:1985:9
 177:     0x7f4dbb49cf5a - call_once<(), alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output=()>, alloc::alloc::Global>, alloc::alloc::Global>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:1985:9
 178:     0x7f4dbb4a5ba5 - thread_start
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys/unix/thread.rs:108:17
 179:     0x7f4dbb2a344b - <unknown>
 180:     0x7f4dbb326e40 - <unknown>
 181:                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.72.0-dev running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [typeck] type-checking `<impl at treereduce.out:9:1: 9:33>::values`
#1 [used_trait_imports] finding used_trait_imports `<impl at treereduce.out:9:1: 9:33>::values`
#2 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 2 previous errors

Some errors have detailed explanations: E0046, E0261.
For more information about an error, try `rustc --explain E0046`.

Metadata

Metadata

Labels

A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`C-bugCategory: This is a bug.D-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.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