error[E0601]: `main` function not found in crate `mvce`
--> /tmp/icemaker_global_tempdir.v0yVDK5NhlGq/rustc_testrunner_tmpdir_reporting.4bSfTVKyGiQj/mvce.rs:3:60
|
3 | const _: &'static Data = unsafe { &*(&[] as *const Data) };
| ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.v0yVDK5NhlGq/rustc_testrunner_tmpdir_reporting.4bSfTVKyGiQj/mvce.rs`
error[E0277]: the size for values of type `[&'static str]` cannot be known at compilation time
--> /tmp/icemaker_global_tempdir.v0yVDK5NhlGq/rustc_testrunner_tmpdir_reporting.4bSfTVKyGiQj/mvce.rs:1:17
|
1 | pub struct Data([[&'static str]; 1]);
| ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `[&'static str]`
= note: slice and array elements must have `Sized` type
error: internal compiler error: /rustc-dev/2972b5e59f1c5529b6ba770437812fd83ab4ebd4/compiler/rustc_const_eval/src/interpret/place.rs:37:17: expected wide pointer extra data (e.g. slice length or trait object vtable)
thread 'rustc' (2516126) panicked at /rustc-dev/2972b5e59f1c5529b6ba770437812fd83ab4ebd4/compiler/rustc_const_eval/src/interpret/place.rs:37:17:
Box<dyn Any>
stack backtrace:
0: 0x7f6be57c0abb - <<std[de416e893de1faf9]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[9f8d6771964fc20c]::fmt::Display>::fmt
1: 0x7f6be5e1e1c8 - core[9f8d6771964fc20c]::fmt::write
2: 0x7f6be57d7ac6 - <std[de416e893de1faf9]::sys::stdio::unix::Stderr as std[de416e893de1faf9]::io::Write>::write_fmt
3: 0x7f6be5796ac8 - std[de416e893de1faf9]::panicking::default_hook::{closure#0}
4: 0x7f6be57b3ec3 - std[de416e893de1faf9]::panicking::default_hook
5: 0x7f6be47c2e4c - std[de416e893de1faf9]::panicking::update_hook::<alloc[57804382fb016052]::boxed::Box<rustc_driver_impl[7a9a631d48bc4eca]::install_ice_hook::{closure#1}>>::{closure#0}
6: 0x7f6be57b41a2 - std[de416e893de1faf9]::panicking::panic_with_hook
7: 0x7f6be47f2e01 - std[de416e893de1faf9]::panicking::begin_panic::<rustc_errors[e123dae814032ce5]::ExplicitBug>::{closure#0}
8: 0x7f6be47eb976 - std[de416e893de1faf9]::sys::backtrace::__rust_end_short_backtrace::<std[de416e893de1faf9]::panicking::begin_panic<rustc_errors[e123dae814032ce5]::ExplicitBug>::{closure#0}, !>
9: 0x7f6be47eb84b - std[de416e893de1faf9]::panicking::begin_panic::<rustc_errors[e123dae814032ce5]::ExplicitBug>
10: 0x7f6be47fe441 - <rustc_errors[e123dae814032ce5]::diagnostic::BugAbort as rustc_errors[e123dae814032ce5]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
11: 0x7f6be4dd4af9 - rustc_middle[4d5ddcd23ba200cb]::util::bug::opt_span_bug_fmt::<rustc_span[ae25d23050d7877d]::span_encoding::Span>::{closure#0}
12: 0x7f6be4dd4c82 - rustc_middle[4d5ddcd23ba200cb]::ty::context::tls::with_opt::<rustc_middle[4d5ddcd23ba200cb]::util::bug::opt_span_bug_fmt<rustc_span[ae25d23050d7877d]::span_encoding::Span>::{closure#0}, !>::{closure#0}
13: 0x7f6be4dc523b - rustc_middle[4d5ddcd23ba200cb]::ty::context::tls::with_context_opt::<rustc_middle[4d5ddcd23ba200cb]::ty::context::tls::with_opt<rustc_middle[4d5ddcd23ba200cb]::util::bug::opt_span_bug_fmt<rustc_span[ae25d23050d7877d]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
14: 0x7f6be1f0c2b4 - rustc_middle[4d5ddcd23ba200cb]::util::bug::bug_fmt
15: 0x7f6be79a511f - <rustc_const_eval[b70cca6f81c4b47b]::interpret::eval_context::InterpCx<rustc_const_eval[b70cca6f81c4b47b]::const_eval::machine::CompileTimeMachine>>::size_and_align_from_meta.cold
16: 0x7f6be64ccdef - <rustc_const_eval[b70cca6f81c4b47b]::interpret::validity::ValidityVisitor<rustc_const_eval[b70cca6f81c4b47b]::const_eval::machine::CompileTimeMachine> as rustc_const_eval[b70cca6f81c4b47b]::interpret::visitor::ValueVisitor<rustc_const_eval[b70cca6f81c4b47b]::const_eval::machine::CompileTimeMachine>>::visit_value
17: 0x7f6be64d0a8d - <rustc_const_eval[b70cca6f81c4b47b]::interpret::validity::ValidityVisitor<rustc_const_eval[b70cca6f81c4b47b]::const_eval::machine::CompileTimeMachine> as rustc_const_eval[b70cca6f81c4b47b]::interpret::visitor::ValueVisitor<rustc_const_eval[b70cca6f81c4b47b]::const_eval::machine::CompileTimeMachine>>::walk_value
18: 0x7f6be64cce46 - <rustc_const_eval[b70cca6f81c4b47b]::interpret::validity::ValidityVisitor<rustc_const_eval[b70cca6f81c4b47b]::const_eval::machine::CompileTimeMachine> as rustc_const_eval[b70cca6f81c4b47b]::interpret::visitor::ValueVisitor<rustc_const_eval[b70cca6f81c4b47b]::const_eval::machine::CompileTimeMachine>>::visit_value
19: 0x7f6be64cf52c - <rustc_const_eval[b70cca6f81c4b47b]::interpret::validity::ValidityVisitor<rustc_const_eval[b70cca6f81c4b47b]::const_eval::machine::CompileTimeMachine> as rustc_const_eval[b70cca6f81c4b47b]::interpret::visitor::ValueVisitor<rustc_const_eval[b70cca6f81c4b47b]::const_eval::machine::CompileTimeMachine>>::walk_value
20: 0x7f6be64cce46 - <rustc_const_eval[b70cca6f81c4b47b]::interpret::validity::ValidityVisitor<rustc_const_eval[b70cca6f81c4b47b]::const_eval::machine::CompileTimeMachine> as rustc_const_eval[b70cca6f81c4b47b]::interpret::visitor::ValueVisitor<rustc_const_eval[b70cca6f81c4b47b]::const_eval::machine::CompileTimeMachine>>::visit_value
21: 0x7f6be64ca65c - rustc_const_eval[b70cca6f81c4b47b]::const_eval::eval_queries::intern_and_validate::<rustc_middle[4d5ddcd23ba200cb]::mir::consts::ConstAlloc>
22: 0x7f6be6eab7f6 - rustc_const_eval[b70cca6f81c4b47b]::const_eval::eval_queries::eval_to_allocation_raw_provider
23: 0x7f6be6ea8ed6 - rustc_query_impl[fdd9a9cd73aeb4]::query_impl::eval_to_allocation_raw::invoke_provider_fn::__rust_begin_short_backtrace
24: 0x7f6be622abd3 - rustc_query_impl[fdd9a9cd73aeb4]::execution::try_execute_query::<rustc_middle[4d5ddcd23ba200cb]::query::caches::DefaultCache<rustc_middle[4d5ddcd23ba200cb]::ty::PseudoCanonicalInput<rustc_middle[4d5ddcd23ba200cb]::mir::interpret::GlobalId>, rustc_middle[4d5ddcd23ba200cb]::query::erase::ErasedData<[u8; 24usize]>>, false>
25: 0x7f6be622a5d1 - rustc_query_impl[fdd9a9cd73aeb4]::query_impl::eval_to_allocation_raw::execute_query_non_incr::__rust_end_short_backtrace
26: 0x7f6be62294bb - rustc_const_eval[b70cca6f81c4b47b]::const_eval::eval_queries::eval_to_const_value_raw_provider
27: 0x7f6be6229016 - rustc_query_impl[fdd9a9cd73aeb4]::query_impl::eval_to_const_value_raw::invoke_provider_fn::__rust_begin_short_backtrace
28: 0x7f6be622aace - rustc_query_impl[fdd9a9cd73aeb4]::execution::try_execute_query::<rustc_middle[4d5ddcd23ba200cb]::query::caches::DefaultCache<rustc_middle[4d5ddcd23ba200cb]::ty::PseudoCanonicalInput<rustc_middle[4d5ddcd23ba200cb]::mir::interpret::GlobalId>, rustc_middle[4d5ddcd23ba200cb]::query::erase::ErasedData<[u8; 24usize]>>, false>
29: 0x7f6be622a689 - rustc_query_impl[fdd9a9cd73aeb4]::query_impl::eval_to_const_value_raw::execute_query_non_incr::__rust_end_short_backtrace
30: 0x7f6be67079d4 - <rustc_middle[4d5ddcd23ba200cb]::ty::context::TyCtxt>::par_hir_body_owners::<rustc_hir_analysis[ffc1d045f4785174]::check_crate::{closure#1}>::{closure#0}
31: 0x7f6be6706fdf - rustc_hir_analysis[ffc1d045f4785174]::check_crate
32: 0x7f6be5eb7f61 - rustc_interface[e1d24a92004beaf7]::passes::analysis
33: 0x7f6be7005049 - rustc_query_impl[fdd9a9cd73aeb4]::execution::try_execute_query::<rustc_middle[4d5ddcd23ba200cb]::query::caches::SingleCache<rustc_middle[4d5ddcd23ba200cb]::query::erase::ErasedData<[u8; 0usize]>>, false>
34: 0x7f6be7004cb5 - rustc_query_impl[fdd9a9cd73aeb4]::query_impl::analysis::execute_query_non_incr::__rust_end_short_backtrace
35: 0x7f6be6fb1990 - rustc_interface[e1d24a92004beaf7]::interface::run_compiler::<(), rustc_driver_impl[7a9a631d48bc4eca]::run_compiler::{closure#0}>::{closure#1}
36: 0x7f6be6fe3c3e - std[de416e893de1faf9]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[e1d24a92004beaf7]::util::run_in_thread_with_globals<rustc_interface[e1d24a92004beaf7]::util::run_in_thread_pool_with_globals<rustc_interface[e1d24a92004beaf7]::interface::run_compiler<(), rustc_driver_impl[7a9a631d48bc4eca]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
37: 0x7f6be6fe44e0 - <std[de416e893de1faf9]::thread::lifecycle::spawn_unchecked<rustc_interface[e1d24a92004beaf7]::util::run_in_thread_with_globals<rustc_interface[e1d24a92004beaf7]::util::run_in_thread_pool_with_globals<rustc_interface[e1d24a92004beaf7]::interface::run_compiler<(), rustc_driver_impl[7a9a631d48bc4eca]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[9f8d6771964fc20c]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
38: 0x7f6be6fe53ec - <std[de416e893de1faf9]::sys::thread::unix::Thread>::new::thread_start
39: 0x7f6be0a6e97a - <unknown>
40: 0x7f6be0af22bc - <unknown>
41: 0x0 - <unknown>
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: please make sure that you have updated to the latest nightly
note: rustc 1.96.0-nightly (2972b5e59 2026-04-03) running on x86_64-unknown-linux-gnu
query stack during panic:
#0 [eval_to_allocation_raw] const-evaluating + checking `_`
#1 [eval_to_const_value_raw] simplifying constant for the type system `_`
#2 [analysis] running analysis passes on crate `mvce`
end of query stack
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0277, E0601.
For more information about an error, try `rustc --explain E0277`.
auto-reduced (treereduce-rust):
original:
Version information
Possibly related line of code:
rust/compiler/rustc_const_eval/src/interpret/place.rs
Lines 31 to 43 in 2972b5e
Command:
/home/matthias/.rustup/toolchains/master/bin/rustcProgram output