Repository navigation
ICE: assertion failure: Size(0 bytes / 8 bytes) rustc_const_eval/src/interpret/place.rs #112623
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.F-const_trait_impl`#![feature(const_trait_impl)]``#![feature(const_trait_impl)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️S-bug-has-testStatus: This bug is tracked inside the repo by a `known-bug` test.Status: This bug is tracked inside the repo by a `known-bug` test.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Activity
- addedI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.C-bugCategory: This is a bug.Category: This is a bug.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.F-const_trait_impl`#![feature(const_trait_impl)]``#![feature(const_trait_impl)]`
on Jun 14, 2023 Regression in nightly-2022-05-28
commit[0] 2022-05-26: Auto merge of #97434 - matthiaskrgr:rollup-7j3y16l, r=matthiaskrgr commit[1] 2022-05-26: Auto merge of #97386 - nnethercote:optimize-pos-adjustments, r=bjorn3 commit[2] 2022-05-27: Auto merge of #96298 - petrochenkov:fromgen, r=estebank commit[3] 2022-05-27: Auto merge of #97444 - compiler-errors:rollup-2gvdav6, r=compiler-errors commit[4] 2022-05-27: Auto merge of #97004 - nnethercote:proc-macro-tweaks, r=eddyb commit[5] 2022-05-27: Auto merge of #97442 - hafeoz:master, r=GuillaumeGomez commit[6] 2022-05-27: Auto merge of #96046 - oli-obk:const_typeck, r=cjgillot commit[7] 2022-05-27: Auto merge of #96790 - lqd:update_jemalloc, r=Mark-SimulacrumThe issue seems to be that
const_traitdoesn't check that the impl function signature matches the trait function signature (until after const eval, at least), so it allows us to pass&Tto an ABI expecting aT. e.g.#![feature(const_trait_impl)] #[const_trait] trait Func { fn trigger(self) -> usize; } struct Cls; impl const Func for Cls { fn trigger(&self, a: usize) -> usize { 0 } } enum Bug<T = [(); Cls.trigger()]> { V(T), }
This ICEs with a mismatch in the number of args
wf_checking, which evaluatesCls.trigger()runs afteritem_types_checkingwhich does report the mismatch- addedglacierICE tracked in rust-lang/glacier.ICE tracked in rust-lang/glacier.
on Jul 14, 2023 Fixed on the latest nightly, marking as E-needs-test (or, feel free to close if we have a sufficient regression test)
@rustbot labels: +E-needs-test- addedE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
on Oct 15, 2023 auto-reduced (treereduce-rust):
#![feature(const_trait_impl, effects)] #[const_trait] trait Value { fn value() -> u32; } const fn get_value<T: ~const Value>() -> u32 { T::value() } struct FortyTwo; impl const Value for FortyTwo { fn value() -> i64 { 42 } } const FORTY_TWO: u32 = get_value::<FortyTwo>(); fn main() { assert_eq!(FORTY_TWO, 42); }
original:
// Tests that a const default trait impl can be specialized by another const // trait impl and that the specializing impl will be used during const-eval. // run-pass #![feature(const_trait_impl, effects)] #![feature(min_specialization)] #[const_trait] trait Value { fn value() -> u32; } const fn get_value<T: ~const Value>() -> u32 { T::value() } impl<T> const Value for T { default fn value() -> u32 { 0 } } struct FortyTwo; impl const Value for FortyTwo { fn value() -> i64 { 42 } } const ZERO: u32 = get_value::<()>(); const FORTY_TWO: u32 = get_value::<FortyTwo>(); fn main() { assert_eq!(ZERO, 0); assert_eq!(FORTY_TWO, 42); }
Version information
rustc 1.78.0-nightly (b381d3ab2 2024-02-12) binary: rustc commit-hash: b381d3ab27f788f990551100c4425bb782d26d76 commit-date: 2024-02-12 host: x86_64-unknown-linux-gnu release: 1.78.0-nightly LLVM version: 17.0.6Command:
/home/matthias/.rustup/toolchains/master/bin/rustcProgram output
error[E0053]: method `value` has an incompatible type for trait --> /tmp/icemaker_global_tempdir.r53dfo7rqFNJ/rustc_testrunner_tmpdir_reporting.fKjNRjvMAypS/mvce.rs:15:19 | 15 | fn value() -> i64 { | ^^^ | | | expected `u32`, found `i64` | help: change the output type to match the trait: `u32` | note: type in trait --> /tmp/icemaker_global_tempdir.r53dfo7rqFNJ/rustc_testrunner_tmpdir_reporting.fKjNRjvMAypS/mvce.rs:5:19 | 5 | fn value() -> u32; | ^^^ = note: expected signature `fn() -> u32` found signature `fn() -> i64` thread 'rustc' panicked at compiler/rustc_const_eval/src/interpret/place.rs:817:17: assertion `left == right` failed left: Size(8 bytes) right: Size(4 bytes) stack backtrace: 0: 0x7f12ebba2476 - std::backtrace_rs::backtrace::libunwind::trace::h3f288a3148e8bb15 at /rustc/b381d3ab27f788f990551100c4425bb782d26d76/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5 1: 0x7f12ebba2476 - std::backtrace_rs::backtrace::trace_unsynchronized::h7277353061928bc0 at /rustc/b381d3ab27f788f990551100c4425bb782d26d76/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x7f12ebba2476 - std::sys_common::backtrace::_print_fmt::hbf79f06a8c92ca0e at /rustc/b381d3ab27f788f990551100c4425bb782d26d76/library/std/src/sys_common/backtrace.rs:68:5 3: 0x7f12ebba2476 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h0afd1ff8e38a8a84 at /rustc/b381d3ab27f788f990551100c4425bb782d26d76/library/std/src/sys_common/backtrace.rs:44:22 4: 0x7f12ebbf5030 - core::fmt::rt::Argument::fmt::h7f26a9b6a6522b09 at /rustc/b381d3ab27f788f990551100c4425bb782d26d76/library/core/src/fmt/rt.rs:142:9 5: 0x7f12ebbf5030 - core::fmt::write::he7de9de816f98016 at /rustc/b381d3ab27f788f990551100c4425bb782d26d76/library/core/src/fmt/mod.rs:1120:17 6: 0x7f12ebb95c6f - std::io::Write::write_fmt::h38e65bf4265dc66c at /rustc/b381d3ab27f788f990551100c4425bb782d26d76/library/std/src/io/mod.rs:1854:15 7: 0x7f12ebba2254 - std::sys_common::backtrace::_print::hf1424a842a74edeb at /rustc/b381d3ab27f788f990551100c4425bb782d26d76/library/std/src/sys_common/backtrace.rs:47:5 8: 0x7f12ebba2254 - std::sys_common::backtrace::print::hbb43acdb160822bd at /rustc/b381d3ab27f788f990551100c4425bb782d26d76/library/std/src/sys_common/backtrace.rs:34:9 9: 0x7f12ebba5047 - std::panicking::default_hook::{{closure}}::h9c602a562527e529 10: 0x7f12ebba4da9 - std::panicking::default_hook::h9cb3bf5f6c73326f at /rustc/b381d3ab27f788f990551100c4425bb782d26d76/library/std/src/panicking.rs:292:9 11: 0x7f12e895cfdc - std[73253c920228642]::panicking::update_hook::<alloc[940273873142bb35]::boxed::Box<rustc_driver_impl[f037f419b039420a]::install_ice_hook::{closure#0}>>::{closure#0} 12: 0x7f12ebba5796 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h1e0fe9ec90d27cc3 at /rustc/b381d3ab27f788f990551100c4425bb782d26d76/library/alloc/src/boxed.rs:2030:9 13: 0x7f12ebba5796 - std::panicking::rust_panic_with_hook::hb5ad56797fd964c4 at /rustc/b381d3ab27f788f990551100c4425bb782d26d76/library/std/src/panicking.rs:785:13 14: 0x7f12ebba54e2 - std::panicking::begin_panic_handler::{{closure}}::hd364aeee29433213 at /rustc/b381d3ab27f788f990551100c4425bb782d26d76/library/std/src/panicking.rs:659:13 15: 0x7f12ebba2976 - std::sys_common::backtrace::__rust_end_short_backtrace::ha10bb1568b9ec73d at /rustc/b381d3ab27f788f990551100c4425bb782d26d76/library/std/src/sys_common/backtrace.rs:171:18 16: 0x7f12ebba5234 - rust_begin_unwind at /rustc/b381d3ab27f788f990551100c4425bb782d26d76/library/std/src/panicking.rs:647:5 17: 0x7f12ebbf1785 - core::panicking::panic_fmt::h91fa7152f33c7717 at /rustc/b381d3ab27f788f990551100c4425bb782d26d76/library/core/src/panicking.rs:72:14 18: 0x7f12ebbf1ccb - core::panicking::assert_failed_inner::h57b72360e97f09d3 at /rustc/b381d3ab27f788f990551100c4425bb782d26d76/library/core/src/panicking.rs:342:17 19: 0x7f12e88da0d3 - core[ed182bbac36ed604]::panicking::assert_failed::<rustc_abi[24af6b384a0c51d]::Size, rustc_abi[24af6b384a0c51d]::Size> 20: 0x7f12ea29d97d - <rustc_const_eval[7bd60fb11925ea71]::interpret::eval_context::InterpCx<rustc_const_eval[7bd60fb11925ea71]::const_eval::machine::CompileTimeInterpreter>>::pop_stack_frame 21: 0x7f12ea9a49ef - rustc_const_eval[7bd60fb11925ea71]::const_eval::eval_queries::eval_body_using_ecx::{closure#0} 22: 0x7f12ea33cb30 - rustc_const_eval[7bd60fb11925ea71]::const_eval::eval_queries::eval_in_interpreter 23: 0x7f12ea33280c - rustc_const_eval[7bd60fb11925ea71]::const_eval::eval_queries::eval_to_allocation_raw_provider 24: 0x7f12ea33264c - rustc_query_impl[b78e7f0549dc02d3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b78e7f0549dc02d3]::query_impl::eval_to_allocation_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[dbb6cff8550fbced]::query::erase::Erased<[u8; 24usize]>> 25: 0x7f12ea3772eb - rustc_query_system[74854bfa6cddafab]::query::plumbing::try_execute_query::<rustc_query_impl[b78e7f0549dc02d3]::DynamicConfig<rustc_query_system[74854bfa6cddafab]::query::caches::DefaultCache<rustc_middle[dbb6cff8550fbced]::ty::ParamEnvAnd<rustc_middle[dbb6cff8550fbced]::mir::interpret::GlobalId>, rustc_middle[dbb6cff8550fbced]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[b78e7f0549dc02d3]::plumbing::QueryCtxt, false> 26: 0x7f12ea376eb0 - rustc_query_impl[b78e7f0549dc02d3]::query_impl::eval_to_allocation_raw::get_query_non_incr::__rust_end_short_backtrace 27: 0x7f12ea3785c2 - rustc_const_eval[7bd60fb11925ea71]::const_eval::eval_queries::eval_to_const_value_raw_provider 28: 0x7f12ea3783f6 - rustc_query_impl[b78e7f0549dc02d3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b78e7f0549dc02d3]::query_impl::eval_to_const_value_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[dbb6cff8550fbced]::query::erase::Erased<[u8; 24usize]>> 29: 0x7f12ea37729d - rustc_query_system[74854bfa6cddafab]::query::plumbing::try_execute_query::<rustc_query_impl[b78e7f0549dc02d3]::DynamicConfig<rustc_query_system[74854bfa6cddafab]::query::caches::DefaultCache<rustc_middle[dbb6cff8550fbced]::ty::ParamEnvAnd<rustc_middle[dbb6cff8550fbced]::mir::interpret::GlobalId>, rustc_middle[dbb6cff8550fbced]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[b78e7f0549dc02d3]::plumbing::QueryCtxt, false> 30: 0x7f12ea376db0 - rustc_query_impl[b78e7f0549dc02d3]::query_impl::eval_to_const_value_raw::get_query_non_incr::__rust_end_short_backtrace 31: 0x7f12e7d289b2 - <rustc_middle[dbb6cff8550fbced]::ty::context::TyCtxt>::const_eval_resolve 32: 0x7f12ea99bfa3 - rustc_const_eval[7bd60fb11925ea71]::const_eval::eval_queries::eval_body_using_ecx::{closure#0} 33: 0x7f12ea33cb30 - rustc_const_eval[7bd60fb11925ea71]::const_eval::eval_queries::eval_in_interpreter 34: 0x7f12ea33280c - rustc_const_eval[7bd60fb11925ea71]::const_eval::eval_queries::eval_to_allocation_raw_provider 35: 0x7f12ea33264c - rustc_query_impl[b78e7f0549dc02d3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b78e7f0549dc02d3]::query_impl::eval_to_allocation_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[dbb6cff8550fbced]::query::erase::Erased<[u8; 24usize]>> 36: 0x7f12ea3772eb - rustc_query_system[74854bfa6cddafab]::query::plumbing::try_execute_query::<rustc_query_impl[b78e7f0549dc02d3]::DynamicConfig<rustc_query_system[74854bfa6cddafab]::query::caches::DefaultCache<rustc_middle[dbb6cff8550fbced]::ty::ParamEnvAnd<rustc_middle[dbb6cff8550fbced]::mir::interpret::GlobalId>, rustc_middle[dbb6cff8550fbced]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[b78e7f0549dc02d3]::plumbing::QueryCtxt, false> 37: 0x7f12ea376eb0 - rustc_query_impl[b78e7f0549dc02d3]::query_impl::eval_to_allocation_raw::get_query_non_incr::__rust_end_short_backtrace 38: 0x7f12ea3785c2 - rustc_const_eval[7bd60fb11925ea71]::const_eval::eval_queries::eval_to_const_value_raw_provider 39: 0x7f12ea3783f6 - rustc_query_impl[b78e7f0549dc02d3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b78e7f0549dc02d3]::query_impl::eval_to_const_value_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[dbb6cff8550fbced]::query::erase::Erased<[u8; 24usize]>> 40: 0x7f12ea37729d - rustc_query_system[74854bfa6cddafab]::query::plumbing::try_execute_query::<rustc_query_impl[b78e7f0549dc02d3]::DynamicConfig<rustc_query_system[74854bfa6cddafab]::query::caches::DefaultCache<rustc_middle[dbb6cff8550fbced]::ty::ParamEnvAnd<rustc_middle[dbb6cff8550fbced]::mir::interpret::GlobalId>, rustc_middle[dbb6cff8550fbced]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[b78e7f0549dc02d3]::plumbing::QueryCtxt, false> 41: 0x7f12ea376db0 - rustc_query_impl[b78e7f0549dc02d3]::query_impl::eval_to_const_value_raw::get_query_non_incr::__rust_end_short_backtrace 42: 0x7f12e7d289b2 - <rustc_middle[dbb6cff8550fbced]::ty::context::TyCtxt>::const_eval_resolve 43: 0x7f12e74633ca - <rustc_mir_transform[21d810ff238a01d7]::const_prop_lint::ConstPropagator as rustc_middle[dbb6cff8550fbced]::mir::visit::Visitor>::visit_operand 44: 0x7f12e7464768 - <rustc_mir_transform[21d810ff238a01d7]::const_prop_lint::ConstPropagator as rustc_middle[dbb6cff8550fbced]::mir::visit::Visitor>::visit_assign 45: 0x7f12ea2086c7 - <rustc_mir_transform[21d810ff238a01d7]::const_prop_lint::ConstPropagator as rustc_middle[dbb6cff8550fbced]::mir::visit::Visitor>::visit_body 46: 0x7f12e74609ea - <rustc_mir_transform[21d810ff238a01d7]::const_prop_lint::ConstPropLint as rustc_mir_transform[21d810ff238a01d7]::pass_manager::MirLint>::run_lint 47: 0x7f12e9c10b29 - rustc_mir_transform[21d810ff238a01d7]::pass_manager::run_passes_inner 48: 0x7f12e7096df3 - rustc_mir_transform[21d810ff238a01d7]::mir_drops_elaborated_and_const_checked 49: 0x7f12e9d70975 - rustc_query_impl[b78e7f0549dc02d3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b78e7f0549dc02d3]::query_impl::mir_drops_elaborated_and_const_checked::dynamic_query::{closure#2}::{closure#0}, rustc_middle[dbb6cff8550fbced]::query::erase::Erased<[u8; 8usize]>> 50: 0x7f12e9d70bfa - rustc_query_system[74854bfa6cddafab]::query::plumbing::try_execute_query::<rustc_query_impl[b78e7f0549dc02d3]::DynamicConfig<rustc_query_system[74854bfa6cddafab]::query::caches::VecCache<rustc_span[a4806a91d128f927]::def_id::LocalDefId, rustc_middle[dbb6cff8550fbced]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[b78e7f0549dc02d3]::plumbing::QueryCtxt, false> 51: 0x7f12e9d704d4 - rustc_query_impl[b78e7f0549dc02d3]::query_impl::mir_drops_elaborated_and_const_checked::get_query_non_incr::__rust_end_short_backtrace 52: 0x7f12ea5e0988 - rustc_interface[ceb207a8fb5539d]::passes::analysis 53: 0x7f12ea5e005f - rustc_query_impl[b78e7f0549dc02d3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b78e7f0549dc02d3]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[dbb6cff8550fbced]::query::erase::Erased<[u8; 1usize]>> 54: 0x7f12eaac6064 - rustc_query_system[74854bfa6cddafab]::query::plumbing::try_execute_query::<rustc_query_impl[b78e7f0549dc02d3]::DynamicConfig<rustc_query_system[74854bfa6cddafab]::query::caches::SingleCache<rustc_middle[dbb6cff8550fbced]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[b78e7f0549dc02d3]::plumbing::QueryCtxt, false> 55: 0x7f12eaac5dc7 - rustc_query_impl[b78e7f0549dc02d3]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace 56: 0x7f12ea9409fb - rustc_interface[ceb207a8fb5539d]::interface::run_compiler::<core[ed182bbac36ed604]::result::Result<(), rustc_span[a4806a91d128f927]::ErrorGuaranteed>, rustc_driver_impl[f037f419b039420a]::run_compiler::{closure#0}>::{closure#0} 57: 0x7f12eab6ef12 - std[73253c920228642]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[ceb207a8fb5539d]::util::run_in_thread_with_globals<rustc_interface[ceb207a8fb5539d]::util::run_in_thread_pool_with_globals<rustc_interface[ceb207a8fb5539d]::interface::run_compiler<core[ed182bbac36ed604]::result::Result<(), rustc_span[a4806a91d128f927]::ErrorGuaranteed>, rustc_driver_impl[f037f419b039420a]::run_compiler::{closure#0}>::{closure#0}, core[ed182bbac36ed604]::result::Result<(), rustc_span[a4806a91d128f927]::ErrorGuaranteed>>::{closure#0}, core[ed182bbac36ed604]::result::Result<(), rustc_span[a4806a91d128f927]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[ed182bbac36ed604]::result::Result<(), rustc_span[a4806a91d128f927]::ErrorGuaranteed>> 58: 0x7f12eab6ed3e - <<std[73253c920228642]::thread::Builder>::spawn_unchecked_<rustc_interface[ceb207a8fb5539d]::util::run_in_thread_with_globals<rustc_interface[ceb207a8fb5539d]::util::run_in_thread_pool_with_globals<rustc_interface[ceb207a8fb5539d]::interface::run_compiler<core[ed182bbac36ed604]::result::Result<(), rustc_span[a4806a91d128f927]::ErrorGuaranteed>, rustc_driver_impl[f037f419b039420a]::run_compiler::{closure#0}>::{closure#0}, core[ed182bbac36ed604]::result::Result<(), rustc_span[a4806a91d128f927]::ErrorGuaranteed>>::{closure#0}, core[ed182bbac36ed604]::result::Result<(), rustc_span[a4806a91d128f927]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[ed182bbac36ed604]::result::Result<(), rustc_span[a4806a91d128f927]::ErrorGuaranteed>>::{closure#1} as core[ed182bbac36ed604]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 59: 0x7f12ebbae985 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h37d86e7af57ec8cf at /rustc/b381d3ab27f788f990551100c4425bb782d26d76/library/alloc/src/boxed.rs:2016:9 60: 0x7f12ebbae985 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h99a2218ed45ac1ce at /rustc/b381d3ab27f788f990551100c4425bb782d26d76/library/alloc/src/boxed.rs:2016:9 61: 0x7f12ebbae985 - std::sys::pal::unix::thread::Thread::new::thread_start::h6344e9d30547345d at /rustc/b381d3ab27f788f990551100c4425bb782d26d76/library/std/src/sys/pal/unix/thread.rs:108:17 62: 0x7f12e5aa09eb - <unknown> 63: 0x7f12e5b247cc - <unknown> 64: 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.78.0-nightly (b381d3ab2 2024-02-12) running on x86_64-unknown-linux-gnu query stack during panic: #0 [eval_to_allocation_raw] const-evaluating + checking `FORTY_TWO` #1 [eval_to_const_value_raw] simplifying constant for the type system `FORTY_TWO` #2 [eval_to_allocation_raw] const-evaluating + checking `main::promoted[1]` #3 [eval_to_const_value_raw] simplifying constant for the type system `main::promoted[1]` | = note: this failure-note originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) #4 [mir_drops_elaborated_and_const_checked] elaborating drops for `main` #5 [analysis] running analysis passes on this crate end of query stack error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0053`.- removedE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.glacierICE tracked in rust-lang/glacier.ICE tracked in rust-lang/glacier.
on Feb 13, 2024 - addedS-bug-has-testStatus: This bug is tracked inside the repo by a `known-bug` test.Status: This bug is tracked inside the repo by a `known-bug` test.
on Apr 19, 2024 - removedrequires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
on Dec 13, 2025 #![feature(const_trait_impl)] const trait Value { fn value() -> u32; } const fn get_value<T: ~const Value>() -> u32 { T::value() } struct FortyTwo; impl const Value for FortyTwo { fn value() -> i64 { 42 } } const FORTY_TWO: u32 = get_value::<FortyTwo>(); fn main() { assert_eq!(FORTY_TWO, 42); }
doesn’t ICE any more.
@rustbot label: +E-needs-test.
- addedE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
on Apr 3, 2026 - added 2 commits that reference this issue
on Apr 9, 2026 - added a commit that references this issue
on Apr 10, 2026 - added a commit that references this issue
on Apr 10, 2026
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.F-const_trait_impl`#![feature(const_trait_impl)]``#![feature(const_trait_impl)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️S-bug-has-testStatus: This bug is tracked inside the repo by a `known-bug` test.Status: This bug is tracked inside the repo by a `known-bug` test.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Meta
rustc --version --verbose:Error output
Backtrace