Repository: rust
Issue: ICE: `expected wide pointer extra data (e.g. slice length or trait object vtable)`
Labels: I-ICE,T-compiler,C-bug,A-const-eval,S-has-mcve,S-bug-has-test

<!--
[31mICE[0m: Rustc ./a.rs '' 'error: internal compiler error: compiler/rustc_const_eval/src/interpret/place.rs:36:17: expected wide pointer extra data (e.g. slice length or trait object vtable)', 'error: internal compiler error: compiler/rustc_const_eval/src/interpret/place.rs:36:17: expected wide pointer extra data (e.g. slice length or trait object vtable)'
File: /tmp/im/a.rs
-->

snippet:
````rust
pub struct Data([[&str]; 5_i32]);
const _: &'static Data = unsafe { &*(&[] as *const Data) };

````

Version information
````
rustc 1.85.0-nightly (acf48426b 2024-12-06)
binary: rustc
commit-hash: acf48426b64d24f372d534f634072de1f4c7e588
commit-date: 2024-12-06
host: x86_64-unknown-linux-gnu
release: 1.85.0-nightly
LLVM version: 19.1.5

````

Possibly related line of code:
https://github.com/rust-lang/rust/blob/acf48426b64d24f372d534f634072de1f4c7e588/compiler/rustc_const_eval/src/interpret/place.rs#L30-L42

Command:
`/home/matthias/.rustup/toolchains/master/bin/rustc `

<details><summary><strong>Program output</strong></summary>
<p>

```
error[E0106]: missing lifetime specifier
 --> /tmp/icemaker_global_tempdir.aSYe5Is2GJl3/rustc_testrunner_tmpdir_reporting.gKjFHYgJOJDL/mvce.rs:1:19
  |
1 | pub struct Data([[&str]; 5_i32]);
  |                   ^ expected named lifetime parameter
  |
help: consider introducing a named lifetime parameter
  |
1 | pub struct Data<'a>([[&'a str]; 5_i32]);
  |                ++++    ++

error[E0601]: `main` function not found in crate `mvce`
 --> /tmp/icemaker_global_tempdir.aSYe5Is2GJl3/rustc_testrunner_tmpdir_reporting.gKjFHYgJOJDL/mvce.rs:2:60
  |
2 | const _: &'static Data = unsafe { &*(&[] as *const Data) };
  |                                                            ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.aSYe5Is2GJl3/rustc_testrunner_tmpdir_reporting.gKjFHYgJOJDL/mvce.rs`

error: internal compiler error: compiler/rustc_const_eval/src/interpret/place.rs:36:17: expected wide pointer extra data (e.g. slice length or trait object vtable)

thread 'rustc' panicked at compiler/rustc_const_eval/src/interpret/place.rs:36:17:
Box<dyn Any>
stack backtrace:
   0:     0x7ad09f54895a - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h69edfa39ad21a03a
   1:     0x7ad09fc13e26 - core::fmt::write::h54afaacea6c2c9e2
   2:     0x7ad0a0bf3ad1 - std::io::Write::write_fmt::h00e73f8f3070368c
   3:     0x7ad09f5487b2 - std::sys::backtrace::BacktraceLock::print::h2b0900033e71643f
   4:     0x7ad09f54acca - std::panicking::default_hook::{{closure}}::h325b3b03f2ea7a39
   5:     0x7ad09f54ab13 - std::panicking::default_hook::haaf25a6e7afde799
   6:     0x7ad09e6c1238 - std[85c61899f894cf29]::panicking::update_hook::<alloc[98b3c20953f4fbe5]::boxed::Box<rustc_driver_impl[45224e78b6d2fe59]::install_ice_hook::{closure#0}>>::{closure#0}
   7:     0x7ad09f54b488 - std::panicking::rust_panic_with_hook::hdc045113cf0fafba
   8:     0x7ad09e6f6771 - std[85c61899f894cf29]::panicking::begin_panic::<rustc_errors[2297728cd06420b6]::ExplicitBug>::{closure#0}
   9:     0x7ad09e6eb916 - std[85c61899f894cf29]::sys::backtrace::__rust_end_short_backtrace::<std[85c61899f894cf29]::panicking::begin_panic<rustc_errors[2297728cd06420b6]::ExplicitBug>::{closure#0}, !>
  10:     0x7ad09e6eb6d3 - std[85c61899f894cf29]::panicking::begin_panic::<rustc_errors[2297728cd06420b6]::ExplicitBug>
  11:     0x7ad09e700711 - <rustc_errors[2297728cd06420b6]::diagnostic::BugAbort as rustc_errors[2297728cd06420b6]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  12:     0x7ad09ece86d3 - rustc_middle[2b65deb07cad4442]::util::bug::opt_span_bug_fmt::<rustc_span[267b34eb586afd37]::span_encoding::Span>::{closure#0}
  13:     0x7ad09ecd0c0a - rustc_middle[2b65deb07cad4442]::ty::context::tls::with_opt::<rustc_middle[2b65deb07cad4442]::util::bug::opt_span_bug_fmt<rustc_span[267b34eb586afd37]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  14:     0x7ad09ecd0a9b - rustc_middle[2b65deb07cad4442]::ty::context::tls::with_context_opt::<rustc_middle[2b65deb07cad4442]::ty::context::tls::with_opt<rustc_middle[2b65deb07cad4442]::util::bug::opt_span_bug_fmt<rustc_span[267b34eb586afd37]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  15:     0x7ad09ce2a8d0 - rustc_middle[2b65deb07cad4442]::util::bug::bug_fmt
  16:     0x7ad0a07da666 - <rustc_const_eval[c1d2b202d9973a02]::interpret::validity::ValidityVisitor<rustc_const_eval[c1d2b202d9973a02]::const_eval::machine::CompileTimeMachine> as rustc_const_eval[c1d2b202d9973a02]::interpret::visitor::ValueVisitor<rustc_const_eval[c1d2b202d9973a02]::const_eval::machine::CompileTimeMachine>>::visit_value
  17:     0x7ad0a07d8eeb - <rustc_const_eval[c1d2b202d9973a02]::interpret::validity::ValidityVisitor<rustc_const_eval[c1d2b202d9973a02]::const_eval::machine::CompileTimeMachine> as rustc_const_eval[c1d2b202d9973a02]::interpret::visitor::ValueVisitor<rustc_const_eval[c1d2b202d9973a02]::const_eval::machine::CompileTimeMachine>>::visit_value
  18:     0x7ad0a07d86fe - <rustc_const_eval[c1d2b202d9973a02]::interpret::validity::ValidityVisitor<rustc_const_eval[c1d2b202d9973a02]::const_eval::machine::CompileTimeMachine> as rustc_const_eval[c1d2b202d9973a02]::interpret::visitor::ValueVisitor<rustc_const_eval[c1d2b202d9973a02]::const_eval::machine::CompileTimeMachine>>::visit_value
  19:     0x7ad0a0808a9c - rustc_const_eval[c1d2b202d9973a02]::const_eval::eval_queries::eval_to_allocation_raw_provider
  20:     0x7ad0a08079be - rustc_query_impl[31526c927efa8eec]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[31526c927efa8eec]::query_impl::eval_to_allocation_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[2b65deb07cad4442]::query::erase::Erased<[u8; 24usize]>>
  21:     0x7ad0a07efc22 - rustc_query_system[8b7296974754ceb3]::query::plumbing::try_execute_query::<rustc_query_impl[31526c927efa8eec]::DynamicConfig<rustc_query_system[8b7296974754ceb3]::query::caches::DefaultCache<rustc_middle[2b65deb07cad4442]::ty::PseudoCanonicalInput<rustc_middle[2b65deb07cad4442]::mir::interpret::GlobalId>, rustc_middle[2b65deb07cad4442]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[31526c927efa8eec]::plumbing::QueryCtxt, false>
  22:     0x7ad0a07ef781 - rustc_query_impl[31526c927efa8eec]::query_impl::eval_to_allocation_raw::get_query_non_incr::__rust_end_short_backtrace
  23:     0x7ad0a07f18f9 - rustc_const_eval[c1d2b202d9973a02]::const_eval::eval_queries::eval_to_const_value_raw_provider
  24:     0x7ad0a07f1702 - rustc_query_impl[31526c927efa8eec]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[31526c927efa8eec]::query_impl::eval_to_const_value_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[2b65deb07cad4442]::query::erase::Erased<[u8; 24usize]>>
  25:     0x7ad0a07efbd9 - rustc_query_system[8b7296974754ceb3]::query::plumbing::try_execute_query::<rustc_query_impl[31526c927efa8eec]::DynamicConfig<rustc_query_system[8b7296974754ceb3]::query::caches::DefaultCache<rustc_middle[2b65deb07cad4442]::ty::PseudoCanonicalInput<rustc_middle[2b65deb07cad4442]::mir::interpret::GlobalId>, rustc_middle[2b65deb07cad4442]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[31526c927efa8eec]::plumbing::QueryCtxt, false>
  26:     0x7ad0a07ef689 - rustc_query_impl[31526c927efa8eec]::query_impl::eval_to_const_value_raw::get_query_non_incr::__rust_end_short_backtrace
  27:     0x7ad0a003a154 - <rustc_middle[2b65deb07cad4442]::hir::map::Map>::par_body_owners::<rustc_hir_analysis[4e6fa7c2cad24599]::check_crate::{closure#3}>::{closure#0}
  28:     0x7ad0a0037b37 - rustc_hir_analysis[4e6fa7c2cad24599]::check_crate
  29:     0x7ad0a0042584 - rustc_interface[51c1904b6ef58290]::passes::run_required_analyses
  30:     0x7ad0a0bd88de - rustc_interface[51c1904b6ef58290]::passes::analysis
  31:     0x7ad0a0bd88af - rustc_query_impl[31526c927efa8eec]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[31526c927efa8eec]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[2b65deb07cad4442]::query::erase::Erased<[u8; 1usize]>>
  32:     0x7ad0a0baf7ba - rustc_query_system[8b7296974754ceb3]::query::plumbing::try_execute_query::<rustc_query_impl[31526c927efa8eec]::DynamicConfig<rustc_query_system[8b7296974754ceb3]::query::caches::SingleCache<rustc_middle[2b65deb07cad4442]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[31526c927efa8eec]::plumbing::QueryCtxt, false>
  33:     0x7ad0a0baf48e - rustc_query_impl[31526c927efa8eec]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  34:     0x7ad0a0c503eb - rustc_interface[51c1904b6ef58290]::interface::run_compiler::<core[ce4f568dace374e]::result::Result<(), rustc_span[267b34eb586afd37]::ErrorGuaranteed>, rustc_driver_impl[45224e78b6d2fe59]::run_compiler::{closure#0}>::{closure#1}
  35:     0x7ad0a0b41ca1 - std[85c61899f894cf29]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[51c1904b6ef58290]::util::run_in_thread_with_globals<rustc_interface[51c1904b6ef58290]::util::run_in_thread_pool_with_globals<rustc_interface[51c1904b6ef58290]::interface::run_compiler<core[ce4f568dace374e]::result::Result<(), rustc_span[267b34eb586afd37]::ErrorGuaranteed>, rustc_driver_impl[45224e78b6d2fe59]::run_compiler::{closure#0}>::{closure#1}, core[ce4f568dace374e]::result::Result<(), rustc_span[267b34eb586afd37]::ErrorGuaranteed>>::{closure#0}, core[ce4f568dace374e]::result::Result<(), rustc_span[267b34eb586afd37]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[ce4f568dace374e]::result::Result<(), rustc_span[267b34eb586afd37]::ErrorGuaranteed>>
  36:     0x7ad0a0b41948 - <<std[85c61899f894cf29]::thread::Builder>::spawn_unchecked_<rustc_interface[51c1904b6ef58290]::util::run_in_thread_with_globals<rustc_interface[51c1904b6ef58290]::util::run_in_thread_pool_with_globals<rustc_interface[51c1904b6ef58290]::interface::run_compiler<core[ce4f568dace374e]::result::Result<(), rustc_span[267b34eb586afd37]::ErrorGuaranteed>, rustc_driver_impl[45224e78b6d2fe59]::run_compiler::{closure#0}>::{closure#1}, core[ce4f568dace374e]::result::Result<(), rustc_span[267b34eb586afd37]::ErrorGuaranteed>>::{closure#0}, core[ce4f568dace374e]::result::Result<(), rustc_span[267b34eb586afd37]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[ce4f568dace374e]::result::Result<(), rustc_span[267b34eb586afd37]::ErrorGuaranteed>>::{closure#1} as core[ce4f568dace374e]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  37:     0x7ad0a0b4107b - std::sys::pal::unix::thread::Thread::new::thread_start::h6f16c939ae6ab66d
  38:     0x7ad09aea339d - <unknown>
  39:     0x7ad09af2849c - <unknown>
  40:                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.85.0-nightly (acf48426b 2024-12-06) 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 `_`
end of query stack
error: aborting due to 3 previous errors

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

```

</p>
</details>

<!--
query stack:
2 | const _: &'static Data = unsafe { &*(&[] as *const Data) };
#0 [eval_to_allocation_raw] const-evaluating + checking `_`
#1 [eval_to_const_value_raw] simplifying constant for the type system `_`

-->