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: assertion failed: tcx.sess.opts.trimmed_def_paths #120035

Closed
matthiaskrgr opened this issue Jan 16, 2024 · 1 comment · Fixed by #120216
Closed

ICE: assertion failed: tcx.sess.opts.trimmed_def_paths #120035

matthiaskrgr opened this issue Jan 16, 2024 · 1 comment · Fixed by #120216
Assignees
Labels
A-clippy Area: Clippy C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

matthiaskrgr commented Jan 16, 2024

Code

clippy-driver ice.rs --edition=2021
what is weird, is that I when looking at the stacktrace, we don't seem to even reach clippy code before the crash, yet I didn't manage to reproduce this with standalone rustc :/

use std::future::Future;

async fn do_transaction<O>(f: impl FnOnce() -> TransactionFuture<'_, O>) -> TransactionResult<O> {
    f().await
}

type TransactionFuture<'__, O> = impl '__ + Future<Output = FnOnce<O>>;

Meta

rustc --version --verbose:

rustc 1.77.0-nightly (714b29a17 2024-01-15)
binary: rustc
commit-hash: 714b29a17ff5fa727c794bbb60bfd335f8e75d42
commit-date: 2024-01-15
host: x86_64-unknown-linux-gnu
release: 1.77.0-nightly
LLVM version: 17.0.6

Error output

error[E0106]: missing lifetime specifier
 --> ice.rs:3:66
  |
3 | async fn do_transaction<O>(f: impl FnOnce() -> TransactionFuture<'_, O>) -> TransactionResult<O> {
  |                                                                  ^^ expected named lifetime parameter
  |
  = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
  = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values
  |
3 | async fn do_transaction<O>(f: impl FnOnce() -> TransactionFuture<'static, O>) -> TransactionResult<O> {
  |                                                                  ~~~~~~~
help: consider making the bound lifetime-generic with a new `'a` lifetime
  |
3 | async fn do_transaction<O>(f: impl for<'a> FnOnce() -> TransactionFuture<'_, O>) -> TransactionResult<O> {
  |                                    +++++++
help: consider introducing a named lifetime parameter
  |
3 | async fn do_transaction<'a, O>(f: impl FnOnce() -> TransactionFuture<'_, O>) -> TransactionResult<O> {
  |                         +++

error[E0412]: cannot find type `TransactionResult` in this scope
 --> ice.rs:3:77
  |
3 | async fn do_transaction<O>(f: impl FnOnce() -> TransactionFuture<'_, O>) -> TransactionResult<O> {
  |                                                                             ^^^^^^^^^^^^^^^^^ help: a type alias with a similar name exists: `TransactionFuture`
...
7 | type TransactionFuture<'__, O> = impl '__ + Future<Output = FnOnce<O>>;
  | ----------------------------------------------------------------------- similarly named type alias `TransactionFuture` defined here

error[E0658]: `impl Trait` in type aliases is unstable
 --> ice.rs:7:34
  |
7 | type TransactionFuture<'__, O> = impl '__ + Future<Output = FnOnce<O>>;
  |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
  = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
  = note: this compiler was built on 2024-01-15; consider upgrading it if it is out of date

error[E0601]: `main` function not found in crate `ice`
 --> ice.rs:7:72
  |
7 | type TransactionFuture<'__, O> = impl '__ + Future<Output = FnOnce<O>>;
  |                                                                        ^ consider adding a `main` function to `ice.rs`

error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change
 --> ice.rs:7:61
  |
7 | type TransactionFuture<'__, O> = impl '__ + Future<Output = FnOnce<O>>;
  |                                                             ^^^^^^^^^ help: use parenthetical notation instead: `FnOnce(O) -> ()`
  |
  = note: see issue #29625 <https://github.com/rust-lang/rust/issues/29625> for more information
  = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
  = note: this compiler was built on 2024-01-15; consider upgrading it if it is out of date

error[E0191]: the value of the associated type `Output` in `std::ops::FnOnce` must be specified
 --> ice.rs:7:61
  |
7 | type TransactionFuture<'__, O> = impl '__ + Future<Output = FnOnce<O>>;
  |                                                             ^^^^^^^^^ help: specify the associated type: `FnOnce<O, Output = Type>`

error[E0277]: the size for values of type `dyn std::ops::FnOnce<O>` cannot be known at compilation time
 --> ice.rs:4:5
  |
4 |     f().await
  |     ^^^^^^^^^ doesn't have a size known at compile-time
  |
  = help: the trait `std::marker::Sized` is not implemented for `dyn std::ops::FnOnce<O>`
  = note: all local variables must have a statically known size
  = help: unsized locals are gated as an unstable feature
Backtrace

thread 'rustc' panicked at compiler/rustc_middle/src/ty/print/pretty.rs:3075:5:
assertion failed: tcx.sess.opts.trimmed_def_paths
stack backtrace:
   0:     0x7fe94fb8b9c6 - std::backtrace_rs::backtrace::libunwind::trace::h68ecfa0f2c969689
                               at /rustc/714b29a17ff5fa727c794bbb60bfd335f8e75d42/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x7fe94fb8b9c6 - std::backtrace_rs::backtrace::trace_unsynchronized::h77ca2776e0b6e626
                               at /rustc/714b29a17ff5fa727c794bbb60bfd335f8e75d42/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fe94fb8b9c6 - std::sys_common::backtrace::_print_fmt::h044f2cf8b72c077b
                               at /rustc/714b29a17ff5fa727c794bbb60bfd335f8e75d42/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x7fe94fb8b9c6 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf037d8d5f0fed317
                               at /rustc/714b29a17ff5fa727c794bbb60bfd335f8e75d42/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7fe94fbde060 - core::fmt::rt::Argument::fmt::h9dade43a98a44f26
                               at /rustc/714b29a17ff5fa727c794bbb60bfd335f8e75d42/library/core/src/fmt/rt.rs:142:9
   5:     0x7fe94fbde060 - core::fmt::write::h2fca794570843be9
                               at /rustc/714b29a17ff5fa727c794bbb60bfd335f8e75d42/library/core/src/fmt/mod.rs:1120:17
   6:     0x7fe94fb7f38f - std::io::Write::write_fmt::h5f8008b3be3c0c06
                               at /rustc/714b29a17ff5fa727c794bbb60bfd335f8e75d42/library/std/src/io/mod.rs:1810:15
   7:     0x7fe94fb8b7a4 - std::sys_common::backtrace::_print::hfa47f5118fe40221
                               at /rustc/714b29a17ff5fa727c794bbb60bfd335f8e75d42/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7fe94fb8b7a4 - std::sys_common::backtrace::print::h74bcc7d48499a21b
                               at /rustc/714b29a17ff5fa727c794bbb60bfd335f8e75d42/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7fe94fb8e537 - std::panicking::default_hook::{{closure}}::hd53944ed65fb9ecb
  10:     0x7fe94fb8e299 - std::panicking::default_hook::h57d73aee3a23c899
                               at /rustc/714b29a17ff5fa727c794bbb60bfd335f8e75d42/library/std/src/panicking.rs:292:9
  11:     0x7fe95296a49c - std[de653b49f04fe422]::panicking::update_hook::<alloc[94ed51b0c544c1d5]::boxed::Box<rustc_driver_impl[21982365783ec637]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7fe94fb8ec86 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h960b4868dc7033dc
                               at /rustc/714b29a17ff5fa727c794bbb60bfd335f8e75d42/library/alloc/src/boxed.rs:2030:9
  13:     0x7fe94fb8ec86 - std::panicking::rust_panic_with_hook::h20146c2704dd1451
                               at /rustc/714b29a17ff5fa727c794bbb60bfd335f8e75d42/library/std/src/panicking.rs:785:13
  14:     0x7fe94fb8e999 - std::panicking::begin_panic_handler::{{closure}}::h8e60d095569a7fc5
                               at /rustc/714b29a17ff5fa727c794bbb60bfd335f8e75d42/library/std/src/panicking.rs:651:13
  15:     0x7fe94fb8bec6 - std::sys_common::backtrace::__rust_end_short_backtrace::h7348f833ddbcadc6
                               at /rustc/714b29a17ff5fa727c794bbb60bfd335f8e75d42/library/std/src/sys_common/backtrace.rs:171:18
  16:     0x7fe94fb8e730 - rust_begin_unwind
                               at /rustc/714b29a17ff5fa727c794bbb60bfd335f8e75d42/library/std/src/panicking.rs:647:5
  17:     0x7fe94fbda765 - core::panicking::panic_fmt::ha18faad21ed34f33
                               at /rustc/714b29a17ff5fa727c794bbb60bfd335f8e75d42/library/core/src/panicking.rs:72:14
  18:     0x7fe94fbda823 - core::panicking::panic::he6e0d1747038b1c9
                               at /rustc/714b29a17ff5fa727c794bbb60bfd335f8e75d42/library/core/src/panicking.rs:144:5
  19:     0x7fe9545f6cd9 - rustc_middle[bb2e9fbab7070ad5]::ty::print::pretty::trimmed_def_paths
  20:     0x7fe954cd1dee - rustc_query_impl[b2bfeeafe4fe0b01]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b2bfeeafe4fe0b01]::query_impl::trimmed_def_paths::dynamic_query::{closure#2}::{closure#0}, rustc_middle[bb2e9fbab7070ad5]::query::erase::Erased<[u8; 8usize]>>
  21:     0x7fe9549c4c32 - rustc_query_system[5a3baadd8f1c36f2]::query::plumbing::try_execute_query::<rustc_query_impl[b2bfeeafe4fe0b01]::DynamicConfig<rustc_query_system[5a3baadd8f1c36f2]::query::caches::SingleCache<rustc_middle[bb2e9fbab7070ad5]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[b2bfeeafe4fe0b01]::plumbing::QueryCtxt, false>
  22:     0x7fe954cfa5a0 - rustc_query_impl[b2bfeeafe4fe0b01]::query_impl::trimmed_def_paths::get_query_non_incr::__rust_end_short_backtrace
  23:     0x7fe954b82596 - <rustc_middle[bb2e9fbab7070ad5]::ty::print::pretty::FmtPrinter as rustc_middle[bb2e9fbab7070ad5]::ty::print::Printer>::print_def_path
  24:     0x7fe95337c16b - <rustc_middle[bb2e9fbab7070ad5]::ty::context::TyCtxt>::def_path_str_with_args::<rustc_span[352188020ae4ad5]::def_id::DefId>
  25:     0x7fe953452002 - <rustc_infer[e76d6447cdd5d740]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[db6417cdd09814d6]::traits::error_reporting::suggestions::TypeErrCtxtExt>::note_obligation_cause_code::<rustc_middle[bb2e9fbab7070ad5]::ty::Predicate>
  26:     0x7fe95346e485 - <rustc_infer[e76d6447cdd5d740]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[db6417cdd09814d6]::traits::error_reporting::type_err_ctxt_ext::InferCtxtPrivExt>::note_obligation_cause
  27:     0x7fe95346124e - <rustc_infer[e76d6447cdd5d740]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[db6417cdd09814d6]::traits::error_reporting::type_err_ctxt_ext::TypeErrCtxtExt>::report_selection_error
  28:     0x7fe95348be63 - <rustc_infer[e76d6447cdd5d740]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[db6417cdd09814d6]::traits::error_reporting::type_err_ctxt_ext::InferCtxtPrivExt>::report_fulfillment_error
  29:     0x7fe95345e605 - <rustc_infer[e76d6447cdd5d740]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[db6417cdd09814d6]::traits::error_reporting::type_err_ctxt_ext::TypeErrCtxtExt>::report_fulfillment_errors
  30:     0x7fe954611d4f - <rustc_hir_typeck[c293925096057caf]::fn_ctxt::FnCtxt>::check_match
  31:     0x7fe9546df7c9 - <rustc_hir_typeck[c293925096057caf]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  32:     0x7fe95460b3ce - <rustc_hir_typeck[c293925096057caf]::fn_ctxt::FnCtxt>::check_block_with_expected
  33:     0x7fe9546092af - <rustc_hir_typeck[c293925096057caf]::fn_ctxt::FnCtxt>::check_block_no_value
  34:     0x7fe9546e1fb2 - <rustc_hir_typeck[c293925096057caf]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  35:     0x7fe95460eb4b - <rustc_hir_typeck[c293925096057caf]::fn_ctxt::FnCtxt>::check_match
  36:     0x7fe9546df7c9 - <rustc_hir_typeck[c293925096057caf]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  37:     0x7fe954609d65 - <rustc_hir_typeck[c293925096057caf]::fn_ctxt::FnCtxt>::check_block_with_expected
  38:     0x7fe9546ded09 - <rustc_hir_typeck[c293925096057caf]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  39:     0x7fe9546e0181 - <rustc_hir_typeck[c293925096057caf]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  40:     0x7fe954609d65 - <rustc_hir_typeck[c293925096057caf]::fn_ctxt::FnCtxt>::check_block_with_expected
  41:     0x7fe9546ded09 - <rustc_hir_typeck[c293925096057caf]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  42:     0x7fe9542d60c8 - rustc_hir_typeck[c293925096057caf]::check::check_fn
  43:     0x7fe954240207 - <rustc_hir_typeck[c293925096057caf]::fn_ctxt::FnCtxt>::check_expr_closure
  44:     0x7fe9546e179d - <rustc_hir_typeck[c293925096057caf]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  45:     0x7fe9542d60c8 - rustc_hir_typeck[c293925096057caf]::check::check_fn
  46:     0x7fe953ece702 - rustc_hir_typeck[c293925096057caf]::typeck
  47:     0x7fe953ecda89 - rustc_query_impl[b2bfeeafe4fe0b01]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b2bfeeafe4fe0b01]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[bb2e9fbab7070ad5]::query::erase::Erased<[u8; 8usize]>>
  48:     0x7fe953cc19b9 - rustc_query_system[5a3baadd8f1c36f2]::query::plumbing::try_execute_query::<rustc_query_impl[b2bfeeafe4fe0b01]::DynamicConfig<rustc_query_system[5a3baadd8f1c36f2]::query::caches::VecCache<rustc_span[352188020ae4ad5]::def_id::LocalDefId, rustc_middle[bb2e9fbab7070ad5]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[b2bfeeafe4fe0b01]::plumbing::QueryCtxt, false>
  49:     0x7fe953cc1650 - rustc_query_impl[b2bfeeafe4fe0b01]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
  50:     0x7fe954c1bf4b - rustc_hir_analysis[11666cb28e0c936a]::collect::type_of::type_of_opaque
  51:     0x7fe954c1bd5b - rustc_query_impl[b2bfeeafe4fe0b01]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b2bfeeafe4fe0b01]::query_impl::type_of_opaque::dynamic_query::{closure#2}::{closure#0}, rustc_middle[bb2e9fbab7070ad5]::query::erase::Erased<[u8; 8usize]>>
  52:     0x7fe953c7df54 - rustc_query_system[5a3baadd8f1c36f2]::query::plumbing::try_execute_query::<rustc_query_impl[b2bfeeafe4fe0b01]::DynamicConfig<rustc_query_system[5a3baadd8f1c36f2]::query::caches::DefaultCache<rustc_span[352188020ae4ad5]::def_id::DefId, rustc_middle[bb2e9fbab7070ad5]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[b2bfeeafe4fe0b01]::plumbing::QueryCtxt, false>
  53:     0x7fe954c52fe2 - rustc_query_impl[b2bfeeafe4fe0b01]::query_impl::type_of_opaque::get_query_non_incr::__rust_end_short_backtrace
  54:     0x7fe953c7caf8 - rustc_middle[bb2e9fbab7070ad5]::query::plumbing::query_get_at::<rustc_query_system[5a3baadd8f1c36f2]::query::caches::DefaultCache<rustc_span[352188020ae4ad5]::def_id::DefId, rustc_middle[bb2e9fbab7070ad5]::query::erase::Erased<[u8; 8usize]>>>
  55:     0x7fe951eb6168 - rustc_hir_analysis[11666cb28e0c936a]::collect::type_of::type_of
  56:     0x7fe953c7f0e6 - rustc_query_impl[b2bfeeafe4fe0b01]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b2bfeeafe4fe0b01]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[bb2e9fbab7070ad5]::query::erase::Erased<[u8; 8usize]>>
  57:     0x7fe953c7df54 - rustc_query_system[5a3baadd8f1c36f2]::query::plumbing::try_execute_query::<rustc_query_impl[b2bfeeafe4fe0b01]::DynamicConfig<rustc_query_system[5a3baadd8f1c36f2]::query::caches::DefaultCache<rustc_span[352188020ae4ad5]::def_id::DefId, rustc_middle[bb2e9fbab7070ad5]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[b2bfeeafe4fe0b01]::plumbing::QueryCtxt, false>
  58:     0x7fe953c7db1d - rustc_query_impl[b2bfeeafe4fe0b01]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
  59:     0x7fe953c7caf8 - rustc_middle[bb2e9fbab7070ad5]::query::plumbing::query_get_at::<rustc_query_system[5a3baadd8f1c36f2]::query::caches::DefaultCache<rustc_span[352188020ae4ad5]::def_id::DefId, rustc_middle[bb2e9fbab7070ad5]::query::erase::Erased<[u8; 8usize]>>>
  60:     0x7fe95477f9c3 - rustc_hir_analysis[11666cb28e0c936a]::check::check::check_item_type
  61:     0x7fe95436cea9 - rustc_hir_analysis[11666cb28e0c936a]::check::wfcheck::check_well_formed
  62:     0x7fe95436bd4d - rustc_query_impl[b2bfeeafe4fe0b01]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b2bfeeafe4fe0b01]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[bb2e9fbab7070ad5]::query::erase::Erased<[u8; 1usize]>>
  63:     0x7fe95436b44b - rustc_query_system[5a3baadd8f1c36f2]::query::plumbing::try_execute_query::<rustc_query_impl[b2bfeeafe4fe0b01]::DynamicConfig<rustc_query_system[5a3baadd8f1c36f2]::query::caches::VecCache<rustc_hir[929b106b64f13e9c]::hir_id::OwnerId, rustc_middle[bb2e9fbab7070ad5]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[b2bfeeafe4fe0b01]::plumbing::QueryCtxt, false>
  64:     0x7fe95436b1c3 - rustc_query_impl[b2bfeeafe4fe0b01]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
  65:     0x7fe954368b77 - rustc_hir_analysis[11666cb28e0c936a]::check::wfcheck::check_mod_type_wf
  66:     0x7fe954368abb - rustc_query_impl[b2bfeeafe4fe0b01]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b2bfeeafe4fe0b01]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[bb2e9fbab7070ad5]::query::erase::Erased<[u8; 1usize]>>
  67:     0x7fe954367c7b - rustc_query_system[5a3baadd8f1c36f2]::query::plumbing::try_execute_query::<rustc_query_impl[b2bfeeafe4fe0b01]::DynamicConfig<rustc_query_system[5a3baadd8f1c36f2]::query::caches::DefaultCache<rustc_span[352188020ae4ad5]::def_id::LocalModDefId, rustc_middle[bb2e9fbab7070ad5]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[b2bfeeafe4fe0b01]::plumbing::QueryCtxt, false>
  68:     0x7fe954367a11 - rustc_query_impl[b2bfeeafe4fe0b01]::query_impl::check_mod_type_wf::get_query_non_incr::__rust_end_short_backtrace
  69:     0x7fe9542589f0 - <rustc_middle[bb2e9fbab7070ad5]::hir::map::Map>::try_par_for_each_module::<rustc_hir_analysis[11666cb28e0c936a]::check_crate::{closure#4}::{closure#0}>::{closure#0}
  70:     0x7fe954256cd0 - rustc_hir_analysis[11666cb28e0c936a]::check_crate
  71:     0x7fe954842a99 - rustc_interface[21c8752f1ec28fc7]::passes::analysis
  72:     0x7fe9548426df - rustc_query_impl[b2bfeeafe4fe0b01]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b2bfeeafe4fe0b01]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[bb2e9fbab7070ad5]::query::erase::Erased<[u8; 1usize]>>
  73:     0x7fe954bc4140 - rustc_query_system[5a3baadd8f1c36f2]::query::plumbing::try_execute_query::<rustc_query_impl[b2bfeeafe4fe0b01]::DynamicConfig<rustc_query_system[5a3baadd8f1c36f2]::query::caches::SingleCache<rustc_middle[bb2e9fbab7070ad5]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[b2bfeeafe4fe0b01]::plumbing::QueryCtxt, false>
  74:     0x7fe954bc3f47 - rustc_query_impl[b2bfeeafe4fe0b01]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  75:     0x7fe95491d9ad - rustc_interface[21c8752f1ec28fc7]::interface::run_compiler::<core[f4fe56fc1188d523]::result::Result<(), rustc_span[352188020ae4ad5]::ErrorGuaranteed>, rustc_driver_impl[21982365783ec637]::run_compiler::{closure#0}>::{closure#0}
  76:     0x7fe954bf0f46 - std[de653b49f04fe422]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[21c8752f1ec28fc7]::util::run_in_thread_with_globals<rustc_interface[21c8752f1ec28fc7]::util::run_in_thread_pool_with_globals<rustc_interface[21c8752f1ec28fc7]::interface::run_compiler<core[f4fe56fc1188d523]::result::Result<(), rustc_span[352188020ae4ad5]::ErrorGuaranteed>, rustc_driver_impl[21982365783ec637]::run_compiler::{closure#0}>::{closure#0}, core[f4fe56fc1188d523]::result::Result<(), rustc_span[352188020ae4ad5]::ErrorGuaranteed>>::{closure#0}, core[f4fe56fc1188d523]::result::Result<(), rustc_span[352188020ae4ad5]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f4fe56fc1188d523]::result::Result<(), rustc_span[352188020ae4ad5]::ErrorGuaranteed>>
  77:     0x7fe954bf0d73 - <<std[de653b49f04fe422]::thread::Builder>::spawn_unchecked_<rustc_interface[21c8752f1ec28fc7]::util::run_in_thread_with_globals<rustc_interface[21c8752f1ec28fc7]::util::run_in_thread_pool_with_globals<rustc_interface[21c8752f1ec28fc7]::interface::run_compiler<core[f4fe56fc1188d523]::result::Result<(), rustc_span[352188020ae4ad5]::ErrorGuaranteed>, rustc_driver_impl[21982365783ec637]::run_compiler::{closure#0}>::{closure#0}, core[f4fe56fc1188d523]::result::Result<(), rustc_span[352188020ae4ad5]::ErrorGuaranteed>>::{closure#0}, core[f4fe56fc1188d523]::result::Result<(), rustc_span[352188020ae4ad5]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f4fe56fc1188d523]::result::Result<(), rustc_span[352188020ae4ad5]::ErrorGuaranteed>>::{closure#1} as core[f4fe56fc1188d523]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  78:     0x7fe94fb98535 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h0f19092afcc582b7
                               at /rustc/714b29a17ff5fa727c794bbb60bfd335f8e75d42/library/alloc/src/boxed.rs:2016:9
  79:     0x7fe94fb98535 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h66aa5d72edb49fb4
                               at /rustc/714b29a17ff5fa727c794bbb60bfd335f8e75d42/library/alloc/src/boxed.rs:2016:9
  80:     0x7fe94fb98535 - std::sys::pal::unix::thread::Thread::new::thread_start::h63b8d4dfd3f92e2e
                               at /rustc/714b29a17ff5fa727c794bbb60bfd335f8e75d42/library/std/src/sys/pal/unix/thread.rs:108:17
  81:     0x7fe94f8979eb - <unknown>
  82:     0x7fe94f91b7cc - <unknown>
  83:                0x0 - <unknown>

error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new?template=ice.yml

note: please attach the file at `/tmp/im/o/rustc-ice-2024-01-16T23_05_41-620598.txt` to your bug report

query stack during panic:
#0 [trimmed_def_paths] calculating trimmed def paths
#1 [typeck] type-checking `do_transaction`
#2 [type_of_opaque] computing type of opaque `do_transaction::{opaque#0}`
#3 [type_of] computing type of `do_transaction::{opaque#0}`
#4 [check_well_formed] checking that `do_transaction::{opaque#0}` is well-formed
#5 [check_mod_type_wf] checking that types are well-formed in top-level module
#6 [analysis] running analysis passes on this crate
end of query stack
note: Clippy version: clippy 0.1.77 (714b29a 2024-01-15)

error[E0782]: trait objects must include the `dyn` keyword
 --> ice.rs:7:61
  |
7 | type TransactionFuture<'__, O> = impl '__ + Future<Output = FnOnce<O>>;
  |                                                             ^^^^^^^^^
  |
help: add `dyn` keyword before this trait
  |
7 | type TransactionFuture<'__, O> = impl '__ + Future<Output = dyn FnOnce<O>>;
  |                                                             +++

error: aborting due to 8 previous errors

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

@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. A-clippy Area: Clippy labels Jan 16, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 16, 2024
@compiler-errors
Copy link
Member

cc @nnethercote just given the name of the issue

@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 17, 2024
@nnethercote nnethercote self-assigned this Jan 21, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jan 22, 2024
…assertion, r=compiler-errors

Fix a `trimmed_def_paths` assertion failure.

`RegionHighlightMode::force_print_trimmed_def_path` can call `trimmed_def_paths` even when `tcx.sess.opts.trimmed_def_paths` is false. Based on the `force` in the method name, it seems this is deliberate, so I have removed the assertion.

Fixes rust-lang#120035.

r? `@compiler-errors`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jan 22, 2024
…assertion, r=compiler-errors

Fix a `trimmed_def_paths` assertion failure.

`RegionHighlightMode::force_print_trimmed_def_path` can call `trimmed_def_paths` even when `tcx.sess.opts.trimmed_def_paths` is false. Based on the `force` in the method name, it seems this is deliberate, so I have removed the assertion.

Fixes rust-lang#120035.

r? `@compiler-errors`
@bors bors closed this as completed in 012a304 Jan 23, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jan 23, 2024
Rollup merge of rust-lang#120216 - nnethercote:fix-trimmed_def_paths-assertion, r=compiler-errors

Fix a `trimmed_def_paths` assertion failure.

`RegionHighlightMode::force_print_trimmed_def_path` can call `trimmed_def_paths` even when `tcx.sess.opts.trimmed_def_paths` is false. Based on the `force` in the method name, it seems this is deliberate, so I have removed the assertion.

Fixes rust-lang#120035.

r? `@compiler-errors`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-clippy Area: Clippy C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants