Closed
Description
#![feature(unsized_fn_params)]
pub fn take_unsized_slice(s: [u8]) {
s[0];
}
Errors:
error: internal compiler error: src/librustc_mir/interpret/place.rs:41: expected wide pointer extra data (e.g. slice length or trait object vtable)
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:882:9
stack backtrace:
0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
1: core::fmt::write
2: std::io::Write::write_fmt
3: std::panicking::default_hook::{{closure}}
4: std::panicking::default_hook
5: rustc_driver::report_ice
6: std::panicking::rust_panic_with_hook
7: std::panicking::begin_panic
8: rustc_errors::HandlerInner::bug
9: rustc_errors::Handler::bug
10: rustc::util::bug::opt_span_bug_fmt::{{closure}}
11: rustc::ty::context::tls::with_opt::{{closure}}
12: rustc::ty::context::tls::with_opt
13: rustc::util::bug::opt_span_bug_fmt
14: rustc::util::bug::bug_fmt
15: rustc_mir::interpret::eval_context::InterpCx<M>::size_and_align_of
16: rustc_mir::interpret::place::<impl rustc_mir::interpret::eval_context::InterpCx<M>>::force_allocation_maybe_sized
17: rustc_mir::interpret::step::<impl rustc_mir::interpret::eval_context::InterpCx<M>>::eval_rvalue_into_place
18: <rustc_mir::transform::const_prop::ConstPropagator as rustc::mir::visit::MutVisitor>::visit_statement
19: <rustc_mir::transform::const_prop::ConstProp as rustc_mir::transform::MirPass>::run_pass
20: rustc_mir::transform::run_passes
21: rustc_mir::transform::run_optimization_passes
22: rustc_mir::transform::optimized_mir
23: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::optimized_mir>::compute
24: rustc::dep_graph::graph::DepGraph::with_task_impl
25: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
26: rustc::ty::<impl rustc::ty::context::TyCtxt>::instance_mir
27: rustc_mir::monomorphize::collector::collect_items_rec
28: rustc_mir::monomorphize::collector::collect_items_rec
29: rustc_session::utils::<impl rustc_session::session::Session>::time
30: rustc_mir::monomorphize::collector::collect_crate_mono_items
31: rustc_mir::monomorphize::partitioning::collect_and_partition_mono_items
32: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::collect_and_partition_mono_items>::compute::{{closure}}
33: rustc::ty::query::__query_compute::collect_and_partition_mono_items
34: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::collect_and_partition_mono_items>::compute
35: rustc::dep_graph::graph::DepGraph::with_task_impl
36: rustc::dep_graph::graph::DepGraph::with_eval_always_task
37: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::force_query_with_job::{{closure}}::{{closure}}
38: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::start_query::{{closure}}::{{closure}}
39: rustc::ty::context::tls::enter_context::{{closure}}
40: rustc::ty::context::tls::set_tlv
41: rustc::ty::context::tls::enter_context
42: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::start_query::{{closure}}
43: rustc::ty::context::tls::with_related_context::{{closure}}
44: rustc::ty::context::tls::with_context::{{closure}}
45: rustc::ty::context::tls::with_context_opt
46: rustc::ty::context::tls::with_context
47: rustc::ty::context::tls::with_related_context
48: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::force_query_with_job::{{closure}}
49: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
50: rustc_codegen_cranelift::driver::codegen_cgus
51: rustc_codegen_cranelift::driver::run_aot
52: rustc_codegen_cranelift::driver::codegen_crate
53: <rustc_codegen_cranelift::CraneliftCodegenBackend as rustc_codegen_utils::codegen_backend::CodegenBackend>::codegen_crate
54: rustc_session::utils::<impl rustc_session::session::Session>::time
55: rustc_interface::passes::QueryContext::enter
56: rustc_interface::queries::Queries::ongoing_codegen
57: rustc_interface::interface::run_compiler_in_existing_thread_pool
58: scoped_tls::ScopedKey<T>::set
59: syntax::with_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.42.0-nightly (c2d141df5 2020-01-24) running on x86_64-apple-darwin
Metadata
Metadata
Assignees
Labels
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlCategory: This is a bug.`#![feature(unsized_fn_params)]``#![feature(unsized_locals)]`Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Relevant to the compiler team, which will review and decide on the PR/issue.ICE tracked in rust-lang/glacier.This issue requires a nightly compiler in some way.