Closed as not planned
Description
Code
#![feature(core_intrinsics, rustc_attrs)]
use std::intrinsics::rustc_peek;
struct S;
#[rustc_mir(rustc_peek_definite_init)]
fn foo(z: S) {
let ret;
rustc_peek(rustc_peek(z));
ret
}
Meta
rustc --version --verbose
:
rustc 1.53.0-nightly (07e0e2ec2 2021-03-24)
binary: rustc
commit-hash: 07e0e2ec268c140e607e1ac7f49f145612d0f597
commit-date: 2021-03-24
host: x86_64-unknown-linux-gnu
release: 1.53.0-nightly
LLVM version: 12.0.0
Error output
thread 'rustc' panicked at 'call to rustc_peek should be preceded by assignment to temporary holding its argument', compiler/rustc_mir/src/transform/rustc_peek.rs:132:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: internal compiler error: unexpected panic
note: 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.53.0-nightly (07e0e2ec2 2021-03-24) running on x86_64-unknown-linux-gnu
note: compiler flags: --crate-type staticlib
query stack during panic:
#0 [mir_const] processing MIR for `foo`
#1 [mir_promoted] processing `foo`
end of query stack
Backtrace
thread 'rustc' panicked at 'call to rustc_peek should be preceded by assignment to temporary holding its argument', compiler/rustc_mir/src/transform/rustc_peek.rs:132:14
stack backtrace:
0: rust_begin_unwind
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/panicking.rs:493:5
1: core::panicking::panic_fmt
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/core/src/panicking.rs:92:14
2: core::option::expect_failed
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/core/src/option.rs:1321:5
3: <rustc_mir::transform::rustc_peek::SanityCheck as rustc_mir::transform::MirPass>::run_pass
4: rustc_mir::transform::run_passes
5: rustc_mir::transform::mir_const
6: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
7: rustc_query_system::query::plumbing::force_query_with_job
8: rustc_query_system::query::plumbing::get_query_impl
9: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::mir_const
10: rustc_mir::transform::mir_promoted
11: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
12: rustc_query_system::query::plumbing::force_query_with_job
13: rustc_query_system::query::plumbing::get_query_impl
14: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::mir_promoted
15: rustc_mir::borrow_check::mir_borrowck
16: core::ops::function::FnOnce::call_once
17: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
18: rustc_query_system::query::plumbing::force_query_with_job
19: rustc_query_system::query::plumbing::get_query_impl
20: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::mir_borrowck
21: rustc_middle::ty::<impl rustc_middle::ty::context::TyCtxt>::par_body_owners
22: rustc_interface::passes::analysis
23: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
24: rustc_data_structures::stack::ensure_sufficient_stack
25: rustc_query_system::query::plumbing::force_query_with_job
26: rustc_query_system::query::plumbing::get_query_impl
27: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
28: rustc_interface::passes::QueryContext::enter
29: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
30: rustc_span::with_source_map
31: rustc_interface::interface::create_compiler_and_run
32: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
error: internal compiler error: unexpected panic
note: 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.53.0-nightly (07e0e2ec2 2021-03-24) running on x86_64-unknown-linux-gnu
note: compiler flags: --crate-type staticlib
query stack during panic:
#0 [mir_const] processing MIR for `foo`
#1 [mir_promoted] processing `foo`
#2 [mir_borrowck] borrow-checking `foo`
#3 [analysis] running analysis passes on this crate
end of query stack
Metadata
Metadata
Assignees
Labels
Category: This is a bug.Internal rustc attributes gated on the `#[rustc_attrs]` feature gate.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.