Skip to content

Conversation

@fmease
Copy link
Member

@fmease fmease commented Jan 16, 2024

This introduces <Type as ~const Trait>::AssocTy and <Type as const Trait>::AssocTy under feature const_trait_impl as discussed.

In this approach, I move the host effect param before all other defaulted generic parameters to avoid the potential creation of forward references inside defaults which rustc isn't equipped to handle (hence E0128). Consider:

#[const_trait]
trait A<T = <() as ~const B>::Type> {}
#[const_trait]
trait B { type Type; }

////////////////////
// In this PR: `host` comes before `T` (which also has a default):

trait A</*host*/const host: bool = true, T = <() as B</*host*/host>>::Type> {}
//                    ---- definition                         ^^^^ reference      

////////////////////
// Without this change, we would create a forward reference which would
// lead to ICEs in `ty::EarlyBinder::instantiate`:

trait A<T = <() as B</*host*/host>>::Type, /*host*/const host: bool = true> {}
//                           ^^^^ forward reference      ---- definition

Waiting on author since this crashes when trying to build std due to an IOOB 😖
and I don't have the time to investigate that right now 😅.

Check out the alternative approach “instantiate_with_host_effect”: #120028.
Waiting on project-const-traits for a decision on which approach to take.

r? ghost

@fmease fmease added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-waiting-on-team DEPRECATED: Use the team-based variants `S-waiting-on-t-lang`, `S-waiting-on-t-compiler`, ... F-const_trait_impl `#![feature(const_trait_impl)]` F-effects `#![feature(effects)]` labels Jan 16, 2024
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 16, 2024
@fmease fmease removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 16, 2024
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-16 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Built container sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Looks like docker image is the same as before, not uploading
https://ci-caches.rust-lang.org/docker/7ebc15c01a233894034d277c8cce4e949f4e7791f66b4727c8fb6e058a0b8171d6152e1441d677cef0653843ceeee469c097b8699b2bb74249e674f6aa1a8813
sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-16]
##[group]Clock drift check
  local time: Tue Jan 16 19:25:14 UTC 2024
  network time: Tue, 16 Jan 2024 19:25:15 GMT
  network time: Tue, 16 Jan 2024 19:25:15 GMT
##[endgroup]
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-16', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'build.optimized-compiler-builtins', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-16/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id            := 99999999
---
   Compiling compiler_builtins v0.1.105
thread 'rustc' panicked at compiler/rustc_hir_typeck/src/method/mod.rs:333:32:
index out of bounds: the len is 1 but the index is 1
stack backtrace:
   0:     0x7f4afad31739 - <std[80a33287ae3dfd0f]::sys_common::backtrace::_print::DisplayBacktrace as core[5468609abfba7582]::fmt::Display>::fmt
   1:     0x7f4afad8a56f - core[5468609abfba7582]::fmt::write
   2:     0x7f4afad25e95 - <std[80a33287ae3dfd0f]::sys::pal::unix::stdio::Stderr as std[80a33287ae3dfd0f]::io::Write>::write_fmt
   3:     0x7f4afad31514 - std[80a33287ae3dfd0f]::sys_common::backtrace::print
   4:     0x7f4afad347fa - std[80a33287ae3dfd0f]::panicking::default_hook::{closure#1}
   5:     0x7f4afad344d5 - std[80a33287ae3dfd0f]::panicking::default_hook
   6:     0x7f4afba1ab47 - <alloc[c691cd81afb870bc]::boxed::Box<rustc_driver_impl[b4ddc506f2cd7cd0]::install_ice_hook::{closure#0}> as core[5468609abfba7582]::ops::function::Fn<(&dyn for<'a, 'b> core[5468609abfba7582]::ops::function::Fn<(&'a core[5468609abfba7582]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[5468609abfba7582]::marker::Send + core[5468609abfba7582]::marker::Sync, &core[5468609abfba7582]::panic::panic_info::PanicInfo)>>::call
   7:     0x7f4afad34ee8 - std[80a33287ae3dfd0f]::panicking::rust_panic_with_hook
   8:     0x7f4afad34c62 - std[80a33287ae3dfd0f]::panicking::begin_panic_handler::{closure#0}
   9:     0x7f4afad31d16 - std[80a33287ae3dfd0f]::sys_common::backtrace::__rust_end_short_backtrace::<std[80a33287ae3dfd0f]::panicking::begin_panic_handler::{closure#0}, !>
  11:     0x7f4afaceced5 - core[5468609abfba7582]::panicking::panic_fmt
  12:     0x7f4afaced112 - core[5468609abfba7582]::panicking::panic_bounds_check
  12:     0x7f4afaced112 - core[5468609abfba7582]::panicking::panic_bounds_check
  13:     0x7f4afc20322a - <rustc_middle[4666f6dee4641324]::ty::list::List<rustc_middle[4666f6dee4641324]::ty::generic_args::GenericArg>>::fill_item::<<rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::obligation_for_method::{closure#0}>
  14:     0x7f4afc201b01 - <rustc_middle[4666f6dee4641324]::ty::list::List<rustc_middle[4666f6dee4641324]::ty::generic_args::GenericArg>>::for_item::<<rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::obligation_for_method::{closure#0}>
  15:     0x7f4afc0b03fe - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::obligation_for_method
  16:     0x7f4afc0f00ba - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::lookup_method_in_trait
  17:     0x7f4afc0b7f28 - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::lookup_op_method
  18:     0x7f4afc0b1a61 - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_overloaded_binop
  19:     0x7f4afc0b1462 - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_binop
  20:     0x7f4afc0d5568 - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_expr_kind
  21:     0x7f4afc058999 - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  22:     0x7f4afc0d467b - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_expr_with_expectation
  23:     0x7f4afc0d5ab0 - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_expr_kind
  24:     0x7f4afc058999 - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  25:     0x7f4afc0d467b - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_expr_with_expectation
  26:     0x7f4afc0d563e - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_expr_kind
  27:     0x7f4afc058999 - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  28:     0x7f4afc0d467b - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_expr_with_expectation
  29:     0x7f4afc081c2d - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_block_with_expected
  30:     0x7f4afc0d54d7 - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_expr_kind
  31:     0x7f4afc058999 - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  32:     0x7f4afc0d467b - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_expr_with_expectation
  33:     0x7f4afc05a210 - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_return_expr
  34:     0x7f4afc279abc - rustc_hir_typeck[ef7d4e20519cfc80]::check::check_fn
  35:     0x7f4afc0cd596 - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_expr_closure
  36:     0x7f4afc0d4f46 - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_expr_kind
  37:     0x7f4afc058999 - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  38:     0x7f4afc0d467b - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_expr_with_expectation
  39:     0x7f4afc081c2d - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_block_with_expected
  40:     0x7f4afc0d54d7 - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_expr_kind
  41:     0x7f4afc058999 - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  42:     0x7f4afc0d467b - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_expr_with_expectation
  43:     0x7f4afc05a210 - <rustc_hir_typeck[ef7d4e20519cfc80]::fn_ctxt::FnCtxt>::check_return_expr
  44:     0x7f4afc279abc - rustc_hir_typeck[ef7d4e20519cfc80]::check::check_fn
  45:     0x7f4afc2dedf0 - rustc_hir_typeck[ef7d4e20519cfc80]::typeck
  46:     0x7f4afd4ff555 - rustc_query_impl[69ef53dbbfec57bc]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[69ef53dbbfec57bc]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4666f6dee4641324]::query::erase::Erased<[u8; 8usize]>>
  47:     0x7f4afd6cad95 - <rustc_query_impl[69ef53dbbfec57bc]::query_impl::typeck::dynamic_query::{closure#2} as core[5468609abfba7582]::ops::function::FnOnce<(rustc_middle[4666f6dee4641324]::ty::context::TyCtxt, rustc_span[58b39aca407c695]::def_id::LocalDefId)>>::call_once
  48:     0x7f4afd8836db - rustc_query_system[e59b2bee89cabbc2]::query::plumbing::try_execute_query::<rustc_query_impl[69ef53dbbfec57bc]::DynamicConfig<rustc_query_system[e59b2bee89cabbc2]::query::caches::VecCache<rustc_span[58b39aca407c695]::def_id::LocalDefId, rustc_middle[4666f6dee4641324]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[69ef53dbbfec57bc]::plumbing::QueryCtxt, false>
  49:     0x7f4afd5b38f5 - rustc_query_impl[69ef53dbbfec57bc]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
  50:     0x7f4afc37544c - rustc_middle[4666f6dee4641324]::query::plumbing::query_get_at::<rustc_query_system[e59b2bee89cabbc2]::query::caches::VecCache<rustc_span[58b39aca407c695]::def_id::LocalDefId, rustc_middle[4666f6dee4641324]::query::erase::Erased<[u8; 8usize]>>>
  51:     0x7f4afc38b112 - rustc_hir_analysis[554c9558fee343dc]::collect::type_of::opaque::find_opaque_ty_constraints_for_rpit
  52:     0x7f4afd4e282a - rustc_query_impl[69ef53dbbfec57bc]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[69ef53dbbfec57bc]::query_impl::type_of_opaque::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4666f6dee4641324]::query::erase::Erased<[u8; 8usize]>>
  53:     0x7f4afd67f679 - <rustc_query_impl[69ef53dbbfec57bc]::query_impl::type_of_opaque::dynamic_query::{closure#2} as core[5468609abfba7582]::ops::function::FnOnce<(rustc_middle[4666f6dee4641324]::ty::context::TyCtxt, rustc_span[58b39aca407c695]::def_id::DefId)>>::call_once
  54:     0x7f4afd824e58 - rustc_query_system[e59b2bee89cabbc2]::query::plumbing::try_execute_query::<rustc_query_impl[69ef53dbbfec57bc]::DynamicConfig<rustc_query_system[e59b2bee89cabbc2]::query::caches::DefaultCache<rustc_span[58b39aca407c695]::def_id::DefId, rustc_middle[4666f6dee4641324]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[69ef53dbbfec57bc]::plumbing::QueryCtxt, false>
  55:     0x7f4afd6cc5b7 - rustc_query_impl[69ef53dbbfec57bc]::query_impl::type_of_opaque::get_query_non_incr::__rust_end_short_backtrace
  56:     0x7f4afc3a7250 - rustc_middle[4666f6dee4641324]::query::plumbing::query_get_at::<rustc_query_system[e59b2bee89cabbc2]::query::caches::DefaultCache<rustc_span[58b39aca407c695]::def_id::DefId, rustc_middle[4666f6dee4641324]::query::erase::Erased<[u8; 8usize]>>>
  57:     0x7f4afc3c1e3a - rustc_hir_analysis[554c9558fee343dc]::collect::type_of::type_of
  58:     0x7f4afd4ff947 - rustc_query_impl[69ef53dbbfec57bc]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[69ef53dbbfec57bc]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4666f6dee4641324]::query::erase::Erased<[u8; 8usize]>>
  59:     0x7f4afd68f009 - <rustc_query_impl[69ef53dbbfec57bc]::query_impl::type_of::dynamic_query::{closure#2} as core[5468609abfba7582]::ops::function::FnOnce<(rustc_middle[4666f6dee4641324]::ty::context::TyCtxt, rustc_span[58b39aca407c695]::def_id::DefId)>>::call_once
  60:     0x7f4afd824e58 - rustc_query_system[e59b2bee89cabbc2]::query::plumbing::try_execute_query::<rustc_query_impl[69ef53dbbfec57bc]::DynamicConfig<rustc_query_system[e59b2bee89cabbc2]::query::caches::DefaultCache<rustc_span[58b39aca407c695]::def_id::DefId, rustc_middle[4666f6dee4641324]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[69ef53dbbfec57bc]::plumbing::QueryCtxt, false>
  61:     0x7f4afd6cc4b7 - rustc_query_impl[69ef53dbbfec57bc]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
  62:     0x7f4afc2e62d0 - rustc_middle[4666f6dee4641324]::query::plumbing::query_get_at::<rustc_query_system[e59b2bee89cabbc2]::query::caches::DefaultCache<rustc_span[58b39aca407c695]::def_id::DefId, rustc_middle[4666f6dee4641324]::query::erase::Erased<[u8; 8usize]>>>
  63:     0x7f4afc2eadb0 - <rustc_privacy[9bae9a446a5f2b31]::EmbargoVisitor as rustc_hir[1f0259c9df5eb97b]::intravisit::Visitor>::visit_item
  64:     0x7f4afc313c00 - <rustc_middle[4666f6dee4641324]::hir::map::Map>::visit_all_item_likes_in_crate::<rustc_privacy[9bae9a446a5f2b31]::EmbargoVisitor>
  65:     0x7f4afc2ef687 - rustc_privacy[9bae9a446a5f2b31]::effective_visibilities
  66:     0x7f4afd4f2b03 - rustc_query_impl[69ef53dbbfec57bc]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[69ef53dbbfec57bc]::query_impl::effective_visibilities::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4666f6dee4641324]::query::erase::Erased<[u8; 8usize]>>
  67:     0x7f4afd688061 - <rustc_query_impl[69ef53dbbfec57bc]::query_impl::effective_visibilities::dynamic_query::{closure#2} as core[5468609abfba7582]::ops::function::FnOnce<(rustc_middle[4666f6dee4641324]::ty::context::TyCtxt, ())>>::call_once
  68:     0x7f4afd7bd3ba - rustc_query_system[e59b2bee89cabbc2]::query::plumbing::try_execute_query::<rustc_query_impl[69ef53dbbfec57bc]::DynamicConfig<rustc_query_system[e59b2bee89cabbc2]::query::caches::SingleCache<rustc_middle[4666f6dee4641324]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[69ef53dbbfec57bc]::plumbing::QueryCtxt, false>
  69:     0x7f4afd8d35bb - rustc_query_impl[69ef53dbbfec57bc]::query_impl::effective_visibilities::get_query_non_incr::__rust_end_short_backtrace
  70:     0x7f4afce5146c - rustc_passes[126eace7de7948d6]::stability::check_unused_or_stable_features
  71:     0x7f4afbc179e7 - <rustc_session[3bcae6ddbb4e98be]::session::Session>::time::<(), rustc_interface[daadf483e4865cfc]::passes::analysis::{closure#0}::{closure#0}::{closure#2}::{closure#0}>
  72:     0x7f4afbc09f0b - <rustc_data_structures[af1b01f402a73773]::sync::parallel::ParallelGuard>::run::<(), rustc_interface[daadf483e4865cfc]::passes::analysis::{closure#0}::{closure#0}::{closure#2}>
  73:     0x7f4afbc18417 - <rustc_session[3bcae6ddbb4e98be]::session::Session>::time::<(), rustc_interface[daadf483e4865cfc]::passes::analysis::{closure#0}>
  74:     0x7f4afbc60415 - rustc_interface[daadf483e4865cfc]::passes::analysis
  75:     0x7f4afd4ffb33 - rustc_query_impl[69ef53dbbfec57bc]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[69ef53dbbfec57bc]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4666f6dee4641324]::query::erase::Erased<[u8; 1usize]>>
  76:     0x7f4afd71eed1 - <rustc_query_impl[69ef53dbbfec57bc]::query_impl::analysis::dynamic_query::{closure#2} as core[5468609abfba7582]::ops::function::FnOnce<(rustc_middle[4666f6dee4641324]::ty::context::TyCtxt, ())>>::call_once
  77:     0x7f4afd7b9268 - rustc_query_system[e59b2bee89cabbc2]::query::plumbing::try_execute_query::<rustc_query_impl[69ef53dbbfec57bc]::DynamicConfig<rustc_query_system[e59b2bee89cabbc2]::query::caches::SingleCache<rustc_middle[4666f6dee4641324]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[69ef53dbbfec57bc]::plumbing::QueryCtxt, false>
  78:     0x7f4afd6cc891 - rustc_query_impl[69ef53dbbfec57bc]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  79:     0x7f4afba541cb - <rustc_middle[4666f6dee4641324]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[b4ddc506f2cd7cd0]::run_compiler::{closure#0}::{closure#0}::{closure#3}, core[5468609abfba7582]::result::Result<(), rustc_span[58b39aca407c695]::ErrorGuaranteed>>
  80:     0x7f4afba7db4c - <rustc_interface[daadf483e4865cfc]::interface::Compiler>::enter::<rustc_driver_impl[b4ddc506f2cd7cd0]::run_compiler::{closure#0}::{closure#0}, core[5468609abfba7582]::result::Result<core[5468609abfba7582]::option::Option<rustc_interface[daadf483e4865cfc]::queries::Linker>, rustc_span[58b39aca407c695]::ErrorGuaranteed>>
  81:     0x7f4afb9edf9e - rustc_span[58b39aca407c695]::set_source_map::<core[5468609abfba7582]::result::Result<(), rustc_span[58b39aca407c695]::ErrorGuaranteed>, rustc_interface[daadf483e4865cfc]::interface::run_compiler<core[5468609abfba7582]::result::Result<(), rustc_span[58b39aca407c695]::ErrorGuaranteed>, rustc_driver_impl[b4ddc506f2cd7cd0]::run_compiler::{closure#0}>::{closure#0}::{closure#0}>
  82:     0x7f4afba0e8ca - <scoped_tls[42c2975c90d4e7f2]::ScopedKey<rustc_span[58b39aca407c695]::SessionGlobals>>::set::<rustc_interface[daadf483e4865cfc]::util::run_in_thread_pool_with_globals<rustc_interface[daadf483e4865cfc]::interface::run_compiler<core[5468609abfba7582]::result::Result<(), rustc_span[58b39aca407c695]::ErrorGuaranteed>, rustc_driver_impl[b4ddc506f2cd7cd0]::run_compiler::{closure#0}>::{closure#0}, core[5468609abfba7582]::result::Result<(), rustc_span[58b39aca407c695]::ErrorGuaranteed>>::{closure#0}, core[5468609abfba7582]::result::Result<(), rustc_span[58b39aca407c695]::ErrorGuaranteed>>
  83:     0x7f4afb9ee47c - rustc_span[58b39aca407c695]::create_session_globals_then::<core[5468609abfba7582]::result::Result<(), rustc_span[58b39aca407c695]::ErrorGuaranteed>, rustc_interface[daadf483e4865cfc]::util::run_in_thread_pool_with_globals<rustc_interface[daadf483e4865cfc]::interface::run_compiler<core[5468609abfba7582]::result::Result<(), rustc_span[58b39aca407c695]::ErrorGuaranteed>, rustc_driver_impl[b4ddc506f2cd7cd0]::run_compiler::{closure#0}>::{closure#0}, core[5468609abfba7582]::result::Result<(), rustc_span[58b39aca407c695]::ErrorGuaranteed>>::{closure#0}>
  84:     0x7f4afba3cd9e - std[80a33287ae3dfd0f]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[daadf483e4865cfc]::util::run_in_thread_with_globals<rustc_interface[daadf483e4865cfc]::util::run_in_thread_pool_with_globals<rustc_interface[daadf483e4865cfc]::interface::run_compiler<core[5468609abfba7582]::result::Result<(), rustc_span[58b39aca407c695]::ErrorGuaranteed>, rustc_driver_impl[b4ddc506f2cd7cd0]::run_compiler::{closure#0}>::{closure#0}, core[5468609abfba7582]::result::Result<(), rustc_span[58b39aca407c695]::ErrorGuaranteed>>::{closure#0}, core[5468609abfba7582]::result::Result<(), rustc_span[58b39aca407c695]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[5468609abfba7582]::result::Result<(), rustc_span[58b39aca407c695]::ErrorGuaranteed>>
  85:     0x7f4afb9f5644 - std[80a33287ae3dfd0f]::panicking::try::<core[5468609abfba7582]::result::Result<(), rustc_span[58b39aca407c695]::ErrorGuaranteed>, core[5468609abfba7582]::panic::unwind_safe::AssertUnwindSafe<<std[80a33287ae3dfd0f]::thread::Builder>::spawn_unchecked_<rustc_interface[daadf483e4865cfc]::util::run_in_thread_with_globals<rustc_interface[daadf483e4865cfc]::util::run_in_thread_pool_with_globals<rustc_interface[daadf483e4865cfc]::interface::run_compiler<core[5468609abfba7582]::result::Result<(), rustc_span[58b39aca407c695]::ErrorGuaranteed>, rustc_driver_impl[b4ddc506f2cd7cd0]::run_compiler::{closure#0}>::{closure#0}, core[5468609abfba7582]::result::Result<(), rustc_span[58b39aca407c695]::ErrorGuaranteed>>::{closure#0}, core[5468609abfba7582]::result::Result<(), rustc_span[58b39aca407c695]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[5468609abfba7582]::result::Result<(), rustc_span[58b39aca407c695]::ErrorGuaranteed>>::{closure#1}::{closure#0}>>
  86:     0x7f4afba402e6 - <<std[80a33287ae3dfd0f]::thread::Builder>::spawn_unchecked_<rustc_interface[daadf483e4865cfc]::util::run_in_thread_with_globals<rustc_interface[daadf483e4865cfc]::util::run_in_thread_pool_with_globals<rustc_interface[daadf483e4865cfc]::interface::run_compiler<core[5468609abfba7582]::result::Result<(), rustc_span[58b39aca407c695]::ErrorGuaranteed>, rustc_driver_impl[b4ddc506f2cd7cd0]::run_compiler::{closure#0}>::{closure#0}, core[5468609abfba7582]::result::Result<(), rustc_span[58b39aca407c695]::ErrorGuaranteed>>::{closure#0}, core[5468609abfba7582]::result::Result<(), rustc_span[58b39aca407c695]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[5468609abfba7582]::result::Result<(), rustc_span[58b39aca407c695]::ErrorGuaranteed>>::{closure#1} as core[5468609abfba7582]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  87:     0x7f4afad407be - <std[80a33287ae3dfd0f]::sys::pal::unix::thread::Thread>::new::thread_start
  89:     0x7f4afabbb0d0 - <unknown>
  90:                0x0 - <unknown>

error: the compiler unexpectedly panicked. this is a bug.
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

warning: the ICE couldn't be written to `/checkout/rustc-ice-2024-01-16T19_29_23-9166.txt`: Read-only file system (os error 30)
note: rustc 1.77.0-nightly (c0a006028 2024-01-16) running on x86_64-unknown-linux-gnu


note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C debug-assertions=on -Z unstable-options -C symbol-mangling-version=v0 -Z unstable-options -Z macro-backtrace -C link-args=-Wl,-z,origin -C link-args=-Wl,-rpath,$ORIGIN/../lib -C split-debuginfo=off -C prefer-dynamic -C llvm-args=-import-instr-limit=10 -Z inline-mir -C embed-bitcode=yes -Z crate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/") -Z binary-dep-depinfo -Z force-unstable-if-unmarked
note: some of the compiler flags provided by cargo are hidden

query stack during panic:
query stack during panic:
#0 [typeck] type-checking `iter::adapters::skip::<impl at library/core/src/iter/adapters/skip.rs:161:1: 163:48>::try_rfold::check`
#1 [type_of_opaque] computing type of opaque `iter::adapters::skip::<impl at library/core/src/iter/adapters/skip.rs:161:1: 163:48>::try_rfold::check::{opaque#0}`
#2 [type_of] computing type of `iter::adapters::skip::<impl at library/core/src/iter/adapters/skip.rs:161:1: 163:48>::try_rfold::check::{opaque#0}`
#3 [effective_visibilities] checking effective visibilities
end of query stack
end of query stack
note: no errors encountered even though `span_delayed_bug` issued

note: those delayed bugs will now be shown as internal compiler errors

error: internal compiler error: {OpaqueTypeKey { def_id: DefId(0:55870 ~ core[ac92]::iter::adapters::skip::{impl#3}::try_rfold::check::{opaque#0}), args: [T/#0, Acc/#1, R/#2, impl FnMut(Acc, T) -> R/#3] }: OpaqueTypeDecl { hidden_type: OpaqueHiddenType { span: library/core/src/iter/adapters/skip.rs:192:14: 192:55 (#31601), ty: ?0t } }}
  = note: delayed at compiler/rustc_infer/src/infer/opaque_types/table.rs:42:43
  = note: delayed at compiler/rustc_infer/src/infer/opaque_types/table.rs:42:43
             0: <rustc_errors::DiagCtxtInner>::emit_diagnostic
             1: <rustc_errors::DiagCtxt>::emit_diagnostic
             2: <rustc_errors::diagnostic_builder::DiagnosticBuilder>::emit_producing_error_guaranteed
             3: <rustc_infer::infer::opaque_types::table::OpaqueTypeStorage as core::ops::drop::Drop>::drop
             4: core::ptr::drop_in_place::<rustc_hir_typeck::inherited::Inherited>
             5: rustc_hir_typeck::typeck
             6: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
             7: <rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId)>>::call_once
             8: rustc_query_system::query::plumbing::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>
             9: rustc_query_impl::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
            10: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>>
            11: rustc_hir_analysis::collect::type_of::opaque::find_opaque_ty_constraints_for_rpit
            12: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::type_of_opaque::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            13: <rustc_query_impl::query_impl::type_of_opaque::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::DefId)>>::call_once
            14: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
            15: rustc_query_impl::query_impl::type_of_opaque::get_query_non_incr::__rust_end_short_backtrace
            16: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, rustc_middle::query::erase::Erased<[u8; 8]>>>
            17: rustc_hir_analysis::collect::type_of::type_of
            18: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            19: <rustc_query_impl::query_impl::type_of::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::DefId)>>::call_once
            20: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
            21: rustc_query_impl::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
            22: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, rustc_middle::query::erase::Erased<[u8; 8]>>>
            23: <rustc_privacy::EmbargoVisitor as rustc_hir::intravisit::Visitor>::visit_item
            24: <rustc_middle::hir::map::Map>::visit_all_item_likes_in_crate::<rustc_privacy::EmbargoVisitor>
            25: rustc_privacy::effective_visibilities
            26: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::effective_visibilities::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            27: <rustc_query_impl::query_impl::effective_visibilities::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, ())>>::call_once
            28: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
            29: rustc_query_impl::query_impl::effective_visibilities::get_query_non_incr::__rust_end_short_backtrace
            31: <rustc_session::session::Session>::time::<(), rustc_interface::passes::analysis::{closure#0}::{closure#0}::{closure#2}::{closure#0}>
            31: <rustc_session::session::Session>::time::<(), rustc_interface::passes::analysis::{closure#0}::{closure#0}::{closure#2}::{closure#0}>
            32: <rustc_data_structures::sync::parallel::ParallelGuard>::run::<(), rustc_interface::passes::analysis::{closure#0}::{closure#0}::{closure#2}>
            34: rustc_interface::passes::analysis
            35: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            36: <rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, ())>>::call_once
            37: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
---
          

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

warning: the ICE couldn't be written to `/checkout/rustc-ice-2024-01-16T19_29_23-9166.txt`: Read-only file system (os error 30)
note: rustc 1.77.0-nightly (c0a006028 2024-01-16) running on x86_64-unknown-linux-gnu


note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C debug-assertions=on -Z unstable-options -C symbol-mangling-version=v0 -Z unstable-options -Z macro-backtrace -C link-args=-Wl,-z,origin -C link-args=-Wl,-rpath,$ORIGIN/../lib -C split-debuginfo=off -C prefer-dynamic -C llvm-args=-import-instr-limit=10 -Z inline-mir -C embed-bitcode=yes -Z crate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/") -Z binary-dep-depinfo -Z force-unstable-if-unmarked
note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
end of query stack
thread 'rustc' panicked at library/core/src/panicking.rs:163:5:
panic in a destructor during cleanup

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

warning: the ICE couldn't be written to `/checkout/rustc-ice-2024-01-16T19_29_23-9166.txt`: Read-only file system (os error 30)
note: rustc 1.77.0-nightly (c0a006028 2024-01-16) running on x86_64-unknown-linux-gnu


note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C debug-assertions=on -Z unstable-options -C symbol-mangling-version=v0 -Z unstable-options -Z macro-backtrace -C link-args=-Wl,-z,origin -C link-args=-Wl,-rpath,$ORIGIN/../lib -C split-debuginfo=off -C prefer-dynamic -C llvm-args=-import-instr-limit=10 -Z inline-mir -C embed-bitcode=yes -Z crate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/") -Z binary-dep-depinfo -Z force-unstable-if-unmarked
note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
end of query stack
thread caused non-unwinding panic. aborting.
rustc exited with signal: 6 (SIGABRT) (core dumped)

Caused by:
Caused by:
  process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc /checkout/obj/build/bootstrap/debug/rustc --crate-name core --edition=2021 library/core/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C debug-assertions=on -Zunstable-options --check-cfg 'cfg(feature, values("debug_refcell", "panic_immediate_abort"))' -C metadata=70719e8645e6f000 -C extra-filename=-70719e8645e6f000 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/release/deps -Csymbol-mangling-version=v0 '--check-cfg=cfg(feature,values(any()))' -Zunstable-options '--check-cfg=cfg(bootstrap)' '--check-cfg=cfg(stdarch_intel_sde)' '--check-cfg=cfg(no_fp_fmt_parse)' '--check-cfg=cfg(no_global_oom_handling)' '--check-cfg=cfg(no_rc)' '--check-cfg=cfg(no_sync)' '--check-cfg=cfg(backtrace_in_libstd)' '--check-cfg=cfg(target_env,values("libnx"))' '--check-cfg=cfg(target_arch,values("spirv","nvptx","xtensa"))' -Zmacro-backtrace -Clink-args=-Wl,-z,origin '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Csplit-debuginfo=off -Cprefer-dynamic -Cllvm-args=-import-instr-limit=10 -Zinline-mir -Cembed-bitcode=yes '-Zcrate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/")' -Z binary-dep-depinfo` (exit status: 254)
  local time: Tue Jan 16 19:29:28 UTC 2024
  network time: Tue, 16 Jan 2024 19:29:28 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

@fmease fmease closed this Jan 16, 2024
@fmease fmease deleted the const-qualified branch January 16, 2024 23:13
@fmease fmease restored the const-qualified branch January 16, 2024 23:13
@fmease fmease deleted the const-qualified branch January 16, 2024 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

F-const_trait_impl `#![feature(const_trait_impl)]` F-effects `#![feature(effects)]` S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-waiting-on-team DEPRECATED: Use the team-based variants `S-waiting-on-t-lang`, `S-waiting-on-t-compiler`, ... T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants