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: self.canonicalize_mode.preserve_universes() #120208

Closed
matthiaskrgr opened this issue Jan 21, 2024 · 0 comments · Fixed by #120213
Closed

ice: assertion failed: self.canonicalize_mode.preserve_universes() #120208

matthiaskrgr opened this issue Jan 21, 2024 · 0 comments · Fixed by #120213
Assignees
Labels
C-bug Category: This is a bug. F-return_type_notation `#[feature(return_type_notation)]` 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

auto-reduced (treereduce-rust):

#![feature(return_type_notation)]

trait HealthCheck {
    async fn check<const N: usize>() -> bool;
}

async fn do_health_check_par<HC>(hc: HC)
where
    HC: HealthCheck<check(): Send> + Send + 'static,
{
}

original:

// edition: 2021
// known-bug: #110963

#![feature(return_type_notation)]

trait HealthCheck {
    async fn check<const N: usize>(&'a mut self) -> bool;
}

async fn do_health_check_par<HC>(hc: HC)
where
    HC: HealthCheck<check(): Send> + Send + 'static,
{
    spawn(async move {});
}

async fn log_health_check_failure() {}

fn main() {}

// Fake tokio spawn

use std::future::Future;
use std::pin::Pin;
use std::task::{Context, Poll};

fn spawn<F>(future: F) -> JoinHandle
where
    F: Future + Send + 'static,
    F::Output: Send + 'static,
{
    loop {}
}

struct JoinHandle;

impl Future for JoinHandle {
    type Output = ();
    fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
        loop {}
    }
}

Version information

rustc 1.77.0-nightly (867d39cdf 2024-01-21)
binary: rustc
commit-hash: 867d39cdf625e4db4b381faff993346582e598b4
commit-date: 2024-01-21
host: x86_64-unknown-linux-gnu
release: 1.77.0-nightly
LLVM version: 17.0.6

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc --edition=2021

Program output

warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /tmp/icemaker_global_tempdir.zo1IV1zDLNti/rustc_testrunner_tmpdir_reporting.wzoINDhzKCZv/mvce.rs:1:12
  |
1 | #![feature(return_type_notation)]
  |            ^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
  = note: `#[warn(incomplete_features)]` on by default

error[E0601]: `main` function not found in crate `mvce`
  --> /tmp/icemaker_global_tempdir.zo1IV1zDLNti/rustc_testrunner_tmpdir_reporting.wzoINDhzKCZv/mvce.rs:11:2
   |
11 | }
   |  ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.zo1IV1zDLNti/rustc_testrunner_tmpdir_reporting.wzoINDhzKCZv/mvce.rs`

error: return type notation is not allowed for functions that have const parameters
 --> /tmp/icemaker_global_tempdir.zo1IV1zDLNti/rustc_testrunner_tmpdir_reporting.wzoINDhzKCZv/mvce.rs:9:21
  |
4 |     async fn check<const N: usize>() -> bool;
  |                    -------------- const parameter declared here
...
9 |     HC: HealthCheck<check(): Send> + Send + 'static,
  |                     ^^^^^^^^^^^^^

warning: unused variable: `hc`
 --> /tmp/icemaker_global_tempdir.zo1IV1zDLNti/rustc_testrunner_tmpdir_reporting.wzoINDhzKCZv/mvce.rs:7:34
  |
7 | async fn do_health_check_par<HC>(hc: HC)
  |                                  ^^ help: if this is intentional, prefix it with an underscore: `_hc`
  |
  = note: `#[warn(unused_variables)]` on by default

thread 'rustc' panicked at compiler/rustc_infer/src/infer/canonical/canonicalizer.rs:621:13:
assertion failed: self.canonicalize_mode.preserve_universes()
stack backtrace:
   0:     0x7f1d87b8c7e6 - std::backtrace_rs::backtrace::libunwind::trace::h724be89a9e40ec49
                               at /rustc/867d39cdf625e4db4b381faff993346582e598b4/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x7f1d87b8c7e6 - std::backtrace_rs::backtrace::trace_unsynchronized::hf0bde6402500fe04
                               at /rustc/867d39cdf625e4db4b381faff993346582e598b4/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f1d87b8c7e6 - std::sys_common::backtrace::_print_fmt::he6075a408ee1232d
                               at /rustc/867d39cdf625e4db4b381faff993346582e598b4/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x7f1d87b8c7e6 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he204d41f17d62b91
                               at /rustc/867d39cdf625e4db4b381faff993346582e598b4/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f1d87bdede0 - core::fmt::rt::Argument::fmt::hf1610cf83738c7b3
                               at /rustc/867d39cdf625e4db4b381faff993346582e598b4/library/core/src/fmt/rt.rs:142:9
   5:     0x7f1d87bdede0 - core::fmt::write::h24507a37e321897e
                               at /rustc/867d39cdf625e4db4b381faff993346582e598b4/library/core/src/fmt/mod.rs:1120:17
   6:     0x7f1d87b8011f - std::io::Write::write_fmt::h04b187f3353e478e
                               at /rustc/867d39cdf625e4db4b381faff993346582e598b4/library/std/src/io/mod.rs:1810:15
   7:     0x7f1d87b8c5c4 - std::sys_common::backtrace::_print::h463d589b0e5ce6b8
                               at /rustc/867d39cdf625e4db4b381faff993346582e598b4/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f1d87b8c5c4 - std::sys_common::backtrace::print::hedf47c99c2ebc7b0
                               at /rustc/867d39cdf625e4db4b381faff993346582e598b4/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f1d87b8f357 - std::panicking::default_hook::{{closure}}::he58a7e015a92f122
  10:     0x7f1d87b8f0b9 - std::panicking::default_hook::h70da1b946611acb4
                               at /rustc/867d39cdf625e4db4b381faff993346582e598b4/library/std/src/panicking.rs:292:9
  11:     0x7f1d8a96dcdc - std[ec97f88c3d12f03e]::panicking::update_hook::<alloc[1a0b465fba8888bc]::boxed::Box<rustc_driver_impl[ac8ee63a7955201d]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7f1d87b8faa6 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hf27588ae0166f73e
                               at /rustc/867d39cdf625e4db4b381faff993346582e598b4/library/alloc/src/boxed.rs:2030:9
  13:     0x7f1d87b8faa6 - std::panicking::rust_panic_with_hook::hb29a0643c8a76675
                               at /rustc/867d39cdf625e4db4b381faff993346582e598b4/library/std/src/panicking.rs:785:13
  14:     0x7f1d87b8f7b9 - std::panicking::begin_panic_handler::{{closure}}::hf72b8224db67d18e
                               at /rustc/867d39cdf625e4db4b381faff993346582e598b4/library/std/src/panicking.rs:651:13
  15:     0x7f1d87b8cce6 - std::sys_common::backtrace::__rust_end_short_backtrace::h5319dcbca486a773
                               at /rustc/867d39cdf625e4db4b381faff993346582e598b4/library/std/src/sys_common/backtrace.rs:171:18
  16:     0x7f1d87b8f544 - rust_begin_unwind
                               at /rustc/867d39cdf625e4db4b381faff993346582e598b4/library/std/src/panicking.rs:647:5
  17:     0x7f1d87bdb4e5 - core::panicking::panic_fmt::h600317e0bbc2a64c
                               at /rustc/867d39cdf625e4db4b381faff993346582e598b4/library/core/src/panicking.rs:72:14
  18:     0x7f1d87bdb5a3 - core::panicking::panic::hbd67e399d93b79e6
                               at /rustc/867d39cdf625e4db4b381faff993346582e598b4/library/core/src/panicking.rs:144:5
  19:     0x7f1d8bf82fcc - <rustc_infer[64ba5e0f8cdc0c1b]::infer::canonical::canonicalizer::Canonicalizer>::canonical_var
  20:     0x7f1d8ac0ab9b - <rustc_infer[64ba5e0f8cdc0c1b]::infer::canonical::canonicalizer::Canonicalizer>::canonicalize_const_var
  21:     0x7f1d8bf82b9b - <rustc_infer[64ba5e0f8cdc0c1b]::infer::canonical::canonicalizer::Canonicalizer as rustc_type_ir[8504b88f9d7e9cda]::fold::TypeFolder<rustc_middle[39e78f378d30b2da]::ty::context::TyCtxt>>::fold_const
  22:     0x7f1d8bf8344f - <&rustc_middle[39e78f378d30b2da]::ty::list::List<rustc_middle[39e78f378d30b2da]::ty::generic_args::GenericArg> as rustc_type_ir[8504b88f9d7e9cda]::fold::TypeFoldable<rustc_middle[39e78f378d30b2da]::ty::context::TyCtxt>>::try_fold_with::<rustc_infer[64ba5e0f8cdc0c1b]::infer::canonical::canonicalizer::Canonicalizer>
  23:     0x7f1d8c07c395 - <rustc_infer[64ba5e0f8cdc0c1b]::infer::InferCtxt>::canonicalize_query::<rustc_middle[39e78f378d30b2da]::ty::sty::AliasTy>
  24:     0x7f1d8c079693 - <rustc_trait_selection[37b656e9446fa98d]::traits::query::normalize::QueryNormalizer as rustc_type_ir[8504b88f9d7e9cda]::fold::FallibleTypeFolder<rustc_middle[39e78f378d30b2da]::ty::context::TyCtxt>>::try_fold_ty
  25:     0x7f1d8c07806c - <&rustc_middle[39e78f378d30b2da]::ty::list::List<rustc_middle[39e78f378d30b2da]::ty::generic_args::GenericArg> as rustc_type_ir[8504b88f9d7e9cda]::fold::TypeFoldable<rustc_middle[39e78f378d30b2da]::ty::context::TyCtxt>>::try_fold_with::<rustc_trait_selection[37b656e9446fa98d]::traits::query::normalize::QueryNormalizer>
  26:     0x7f1d8c722853 - <rustc_infer[64ba5e0f8cdc0c1b]::infer::InferCtxtBuilder as rustc_trait_selection[37b656e9446fa98d]::infer::InferCtxtBuilderExt>::enter_canonical_trait_query::<rustc_middle[39e78f378d30b2da]::ty::ParamEnvAnd<rustc_middle[39e78f378d30b2da]::traits::query::type_op::Normalize<rustc_middle[39e78f378d30b2da]::ty::Clause>>, rustc_middle[39e78f378d30b2da]::ty::Clause, rustc_traits[5d281b8982a8b3f6]::type_op::type_op_normalize<rustc_middle[39e78f378d30b2da]::ty::Clause>>
  27:     0x7f1d8c72219e - rustc_query_impl[9a5ad8910be61754]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[9a5ad8910be61754]::query_impl::type_op_normalize_clause::dynamic_query::{closure#2}::{closure#0}, rustc_middle[39e78f378d30b2da]::query::erase::Erased<[u8; 8usize]>>
  28:     0x7f1d8c722165 - <rustc_query_impl[9a5ad8910be61754]::query_impl::type_op_normalize_clause::dynamic_query::{closure#2} as core[7f256bc05cbdfe52]::ops::function::FnOnce<(rustc_middle[39e78f378d30b2da]::ty::context::TyCtxt, rustc_type_ir[8504b88f9d7e9cda]::canonical::Canonical<rustc_middle[39e78f378d30b2da]::ty::context::TyCtxt, rustc_middle[39e78f378d30b2da]::ty::ParamEnvAnd<rustc_middle[39e78f378d30b2da]::traits::query::type_op::Normalize<rustc_middle[39e78f378d30b2da]::ty::Clause>>>)>>::call_once
  29:     0x7f1d8c7213b4 - rustc_query_system[bd01bebe767ccb0c]::query::plumbing::try_execute_query::<rustc_query_impl[9a5ad8910be61754]::DynamicConfig<rustc_query_system[bd01bebe767ccb0c]::query::caches::DefaultCache<rustc_type_ir[8504b88f9d7e9cda]::canonical::Canonical<rustc_middle[39e78f378d30b2da]::ty::context::TyCtxt, rustc_middle[39e78f378d30b2da]::ty::ParamEnvAnd<rustc_middle[39e78f378d30b2da]::traits::query::type_op::Normalize<rustc_middle[39e78f378d30b2da]::ty::Ty>>>, rustc_middle[39e78f378d30b2da]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[9a5ad8910be61754]::plumbing::QueryCtxt, false>
  30:     0x7f1d8c721020 - rustc_query_impl[9a5ad8910be61754]::query_impl::type_op_normalize_clause::get_query_non_incr::__rust_end_short_backtrace
  31:     0x7f1d8c45face - <rustc_middle[39e78f378d30b2da]::ty::Clause as rustc_trait_selection[37b656e9446fa98d]::traits::query::type_op::normalize::Normalizable>::type_op_method
  32:     0x7f1d8ca1b165 - <rustc_borrowck[ad4fa52b0cb76942]::type_check::TypeChecker>::typeck_mir
  33:     0x7f1d8935c504 - rustc_borrowck[ad4fa52b0cb76942]::type_check::type_check
  34:     0x7f1d893401c6 - rustc_borrowck[ad4fa52b0cb76942]::nll::compute_regions
  35:     0x7f1d8ca488b3 - rustc_borrowck[ad4fa52b0cb76942]::do_mir_borrowck
  36:     0x7f1d8ca38ad9 - rustc_borrowck[ad4fa52b0cb76942]::mir_borrowck
  37:     0x7f1d8ca38519 - rustc_query_impl[9a5ad8910be61754]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[9a5ad8910be61754]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[39e78f378d30b2da]::query::erase::Erased<[u8; 8usize]>>
  38:     0x7f1d8be34639 - rustc_query_system[bd01bebe767ccb0c]::query::plumbing::try_execute_query::<rustc_query_impl[9a5ad8910be61754]::DynamicConfig<rustc_query_system[bd01bebe767ccb0c]::query::caches::VecCache<rustc_span[a1c8e94b6f6e1574]::def_id::LocalDefId, rustc_middle[39e78f378d30b2da]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[9a5ad8910be61754]::plumbing::QueryCtxt, false>
  39:     0x7f1d8be3409c - rustc_query_impl[9a5ad8910be61754]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  40:     0x7f1d8cc19b2d - rustc_hir_analysis[890c39eb2debb756]::collect::type_of::type_of_opaque
  41:     0x7f1d8cc197a7 - rustc_query_impl[9a5ad8910be61754]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[9a5ad8910be61754]::query_impl::type_of_opaque::dynamic_query::{closure#2}::{closure#0}, rustc_middle[39e78f378d30b2da]::query::erase::Erased<[u8; 8usize]>>
  42:     0x7f1d8bc5c021 - rustc_query_system[bd01bebe767ccb0c]::query::plumbing::try_execute_query::<rustc_query_impl[9a5ad8910be61754]::DynamicConfig<rustc_query_system[bd01bebe767ccb0c]::query::caches::DefIdCache<rustc_middle[39e78f378d30b2da]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[9a5ad8910be61754]::plumbing::QueryCtxt, false>
  43:     0x7f1d8cc5f05e - rustc_query_impl[9a5ad8910be61754]::query_impl::type_of_opaque::get_query_non_incr::__rust_end_short_backtrace
  44:     0x7f1d8c0395d1 - rustc_middle[39e78f378d30b2da]::query::plumbing::query_get_at::<rustc_query_system[bd01bebe767ccb0c]::query::caches::DefIdCache<rustc_middle[39e78f378d30b2da]::query::erase::Erased<[u8; 8usize]>>>
  45:     0x7f1d89ecd9ec - rustc_hir_analysis[890c39eb2debb756]::collect::type_of::type_of
  46:     0x7f1d8bc5d3aa - rustc_query_impl[9a5ad8910be61754]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[9a5ad8910be61754]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[39e78f378d30b2da]::query::erase::Erased<[u8; 8usize]>>
  47:     0x7f1d8bc5c021 - rustc_query_system[bd01bebe767ccb0c]::query::plumbing::try_execute_query::<rustc_query_impl[9a5ad8910be61754]::DynamicConfig<rustc_query_system[bd01bebe767ccb0c]::query::caches::DefIdCache<rustc_middle[39e78f378d30b2da]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[9a5ad8910be61754]::plumbing::QueryCtxt, false>
  48:     0x7f1d8bc5bbdd - rustc_query_impl[9a5ad8910be61754]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
  49:     0x7f1d8c0395d1 - rustc_middle[39e78f378d30b2da]::query::plumbing::query_get_at::<rustc_query_system[bd01bebe767ccb0c]::query::caches::DefIdCache<rustc_middle[39e78f378d30b2da]::query::erase::Erased<[u8; 8usize]>>>
  50:     0x7f1d8c8b0ed7 - rustc_hir_analysis[890c39eb2debb756]::check::check::check_item_type
  51:     0x7f1d8c16a657 - rustc_hir_analysis[890c39eb2debb756]::check::wfcheck::check_well_formed
  52:     0x7f1d8c169619 - rustc_query_impl[9a5ad8910be61754]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[9a5ad8910be61754]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[39e78f378d30b2da]::query::erase::Erased<[u8; 1usize]>>
  53:     0x7f1d8c168cf1 - rustc_query_system[bd01bebe767ccb0c]::query::plumbing::try_execute_query::<rustc_query_impl[9a5ad8910be61754]::DynamicConfig<rustc_query_system[bd01bebe767ccb0c]::query::caches::VecCache<rustc_hir[19fa2e48be4bf838]::hir_id::OwnerId, rustc_middle[39e78f378d30b2da]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[9a5ad8910be61754]::plumbing::QueryCtxt, false>
  54:     0x7f1d8c168a61 - rustc_query_impl[9a5ad8910be61754]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
  55:     0x7f1d8c16650c - rustc_hir_analysis[890c39eb2debb756]::check::wfcheck::check_mod_type_wf
  56:     0x7f1d8c166435 - rustc_query_impl[9a5ad8910be61754]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[9a5ad8910be61754]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[39e78f378d30b2da]::query::erase::Erased<[u8; 1usize]>>
  57:     0x7f1d8c9c4afb - rustc_query_system[bd01bebe767ccb0c]::query::plumbing::try_execute_query::<rustc_query_impl[9a5ad8910be61754]::DynamicConfig<rustc_query_system[bd01bebe767ccb0c]::query::caches::DefaultCache<rustc_span[a1c8e94b6f6e1574]::def_id::LocalModDefId, rustc_middle[39e78f378d30b2da]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[9a5ad8910be61754]::plumbing::QueryCtxt, false>
  58:     0x7f1d8c9c4803 - rustc_query_impl[9a5ad8910be61754]::query_impl::check_mod_type_wf::get_query_non_incr::__rust_end_short_backtrace
  59:     0x7f1d8be31a85 - rustc_middle[39e78f378d30b2da]::query::plumbing::query_ensure_error_guaranteed::<rustc_query_system[bd01bebe767ccb0c]::query::caches::DefaultCache<rustc_span[a1c8e94b6f6e1574]::def_id::LocalModDefId, rustc_middle[39e78f378d30b2da]::query::erase::Erased<[u8; 1usize]>>, ()>
  60:     0x7f1d8be323cb - rustc_hir_analysis[890c39eb2debb756]::check_crate
  61:     0x7f1d8c574b92 - rustc_interface[15087acd939f8ea0]::passes::analysis
  62:     0x7f1d8c5747df - rustc_query_impl[9a5ad8910be61754]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[9a5ad8910be61754]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[39e78f378d30b2da]::query::erase::Erased<[u8; 1usize]>>
  63:     0x7f1d8c64cbf2 - rustc_query_system[bd01bebe767ccb0c]::query::plumbing::try_execute_query::<rustc_query_impl[9a5ad8910be61754]::DynamicConfig<rustc_query_system[bd01bebe767ccb0c]::query::caches::SingleCache<rustc_middle[39e78f378d30b2da]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[9a5ad8910be61754]::plumbing::QueryCtxt, false>
  64:     0x7f1d8c64c955 - rustc_query_impl[9a5ad8910be61754]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  65:     0x7f1d8c9747b3 - rustc_interface[15087acd939f8ea0]::interface::run_compiler::<core[7f256bc05cbdfe52]::result::Result<(), rustc_span[a1c8e94b6f6e1574]::ErrorGuaranteed>, rustc_driver_impl[ac8ee63a7955201d]::run_compiler::{closure#0}>::{closure#0}
  66:     0x7f1d8cc0ddc6 - std[ec97f88c3d12f03e]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[15087acd939f8ea0]::util::run_in_thread_with_globals<rustc_interface[15087acd939f8ea0]::util::run_in_thread_pool_with_globals<rustc_interface[15087acd939f8ea0]::interface::run_compiler<core[7f256bc05cbdfe52]::result::Result<(), rustc_span[a1c8e94b6f6e1574]::ErrorGuaranteed>, rustc_driver_impl[ac8ee63a7955201d]::run_compiler::{closure#0}>::{closure#0}, core[7f256bc05cbdfe52]::result::Result<(), rustc_span[a1c8e94b6f6e1574]::ErrorGuaranteed>>::{closure#0}, core[7f256bc05cbdfe52]::result::Result<(), rustc_span[a1c8e94b6f6e1574]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[7f256bc05cbdfe52]::result::Result<(), rustc_span[a1c8e94b6f6e1574]::ErrorGuaranteed>>
  67:     0x7f1d8cc0dbf3 - <<std[ec97f88c3d12f03e]::thread::Builder>::spawn_unchecked_<rustc_interface[15087acd939f8ea0]::util::run_in_thread_with_globals<rustc_interface[15087acd939f8ea0]::util::run_in_thread_pool_with_globals<rustc_interface[15087acd939f8ea0]::interface::run_compiler<core[7f256bc05cbdfe52]::result::Result<(), rustc_span[a1c8e94b6f6e1574]::ErrorGuaranteed>, rustc_driver_impl[ac8ee63a7955201d]::run_compiler::{closure#0}>::{closure#0}, core[7f256bc05cbdfe52]::result::Result<(), rustc_span[a1c8e94b6f6e1574]::ErrorGuaranteed>>::{closure#0}, core[7f256bc05cbdfe52]::result::Result<(), rustc_span[a1c8e94b6f6e1574]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[7f256bc05cbdfe52]::result::Result<(), rustc_span[a1c8e94b6f6e1574]::ErrorGuaranteed>>::{closure#1} as core[7f256bc05cbdfe52]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  68:     0x7f1d87b99395 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h4f918b95d8571b4b
                               at /rustc/867d39cdf625e4db4b381faff993346582e598b4/library/alloc/src/boxed.rs:2016:9
  69:     0x7f1d87b99395 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h5b8db489c90c1046
                               at /rustc/867d39cdf625e4db4b381faff993346582e598b4/library/alloc/src/boxed.rs:2016:9
  70:     0x7f1d87b99395 - std::sys::pal::unix::thread::Thread::new::thread_start::h324a3fd6add17bd3
                               at /rustc/867d39cdf625e4db4b381faff993346582e598b4/library/std/src/sys/pal/unix/thread.rs:108:17
  71:     0x7f1d879859eb - <unknown>
  72:     0x7f1d87a097cc - <unknown>
  73:                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.77.0-nightly (867d39cdf 2024-01-21) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z dump-mir-dir=dir

query stack during panic:
#0 [type_op_normalize_clause] normalizing `Binder { value: TraitPredicate(<<HC as HealthCheck>::{opaque#0}<^0> as core::marker::Send>, polarity:Positive), bound_vars: [Const] }`
#1 [mir_borrowck] borrow-checking `do_health_check_par`
#2 [type_of_opaque] computing type of opaque `do_health_check_par::{opaque#0}`
#3 [type_of] computing type of `do_health_check_par::{opaque#0}`
#4 [check_well_formed] checking that `do_health_check_par::{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
error: aborting due to 2 previous errors; 2 warnings emitted

For more information about this error, try `rustc --explain E0601`.

@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. F-return_type_notation `#[feature(return_type_notation)]` labels Jan 21, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 21, 2024
@compiler-errors compiler-errors self-assigned this Jan 21, 2024
@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 21, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jan 22, 2024
…time-binders-in-rtn, r=fmease

Don't actually make bound ty/const for RTN

Avoid creating an unnecessary non-lifetime binder when we do RTN on a method that has ty/const params.

Fixes rust-lang#120208

r? oli-obk
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jan 22, 2024
…time-binders-in-rtn, r=fmease

Don't actually make bound ty/const for RTN

Avoid creating an unnecessary non-lifetime binder when we do RTN on a method that has ty/const params.

Fixes rust-lang#120208

r? oli-obk
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jan 22, 2024
…time-binders-in-rtn, r=fmease

Don't actually make bound ty/const for RTN

Avoid creating an unnecessary non-lifetime binder when we do RTN on a method that has ty/const params.

Fixes rust-lang#120208

r? oli-obk
@bors bors closed this as completed in ba542c8 Jan 22, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jan 22, 2024
Rollup merge of rust-lang#120213 - compiler-errors:dont-make-non-lifetime-binders-in-rtn, r=fmease

Don't actually make bound ty/const for RTN

Avoid creating an unnecessary non-lifetime binder when we do RTN on a method that has ty/const params.

Fixes rust-lang#120208

r? oli-obk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. F-return_type_notation `#[feature(return_type_notation)]` 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.

4 participants