Closed
Description
Code
#[lang = "owned_box"]
struct Foo;
fn main() {
Foo
}
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
error[E0658]: language items are subject to change
--> perses_node_priority_with_dfs_delta_reduced_mutant.rs:1:1
|
1 | #[lang = "owned_box"]
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: add `#![feature(lang_items)]` to the crate attributes to enable
error[E0152]: found duplicate lang item `owned_box`
--> perses_node_priority_with_dfs_delta_reduced_mutant.rs:2:1
|
2 | struct Foo;
| ^^^^^^^^^^^
|
= note: the lang item is first defined in crate `alloc` (which `std` depends on)
= note: first definition in `alloc` loaded from /home/cnsun/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-3aeb407930ebd519.rlib
= note: second definition in the local crate (`perses_node_priority_with_dfs_delta_reduced_mutant`)
thread 'rustc' panicked at 'index out of bounds: the len is 0 but the index is 0', compiler/rustc_middle/src/ty/subst.rs:302:43
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
query stack during panic:
#0 [typeck] type-checking `main`
#1 [typeck_item_bodies] type-checking all item bodies
end of query stack
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0152, E0658.
For more information about an error, try `rustc --explain E0152`.
Backtrace
error[E0658]: language items are subject to change
--> perses_node_priority_with_dfs_delta_reduced_mutant.rs:1:1
|
1 | #[lang = "owned_box"]
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: add `#![feature(lang_items)]` to the crate attributes to enable
error[E0152]: found duplicate lang item `owned_box`
--> perses_node_priority_with_dfs_delta_reduced_mutant.rs:2:1
|
2 | struct Foo;
| ^^^^^^^^^^^
|
= note: the lang item is first defined in crate `alloc` (which `std` depends on)
= note: first definition in `alloc` loaded from /home/cnsun/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-3aeb407930ebd519.rlib
= note: second definition in the local crate (`perses_node_priority_with_dfs_delta_reduced_mutant`)
thread 'rustc' panicked at 'index out of bounds: the len is 0 but the index is 0', compiler/rustc_middle/src/ty/subst.rs:302:43
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::panicking::panic_bounds_check
at /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/core/src/panicking.rs:69:5
3: rustc_middle::ty::sty::<impl rustc_middle::ty::TyS>::boxed_ty
4: rustc_middle::ty::sty::<impl rustc_middle::ty::TyS>::builtin_deref
5: <rustc_trait_selection::autoderef::Autoderef as core::iter::traits::iterator::Iterator>::next
6: rustc_typeck::check::coercion::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::deref_steps
7: rustc_typeck::check::demand::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_ref
8: rustc_typeck::check::fn_ctxt::suggestions::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::suggest_deref_ref_or_into
9: rustc_typeck::check::demand::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::emit_coerce_suggestions
10: rustc_typeck::check::coercion::CoerceMany<E>::coerce_inner
11: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
12: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
13: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_return_expr
14: rustc_typeck::check::check::check_fn
15: rustc_infer::infer::InferCtxtBuilder::enter
16: rustc_typeck::check::typeck
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>::typeck
21: rustc_middle::ty::<impl rustc_middle::ty::context::TyCtxt>::par_body_owners
22: rustc_typeck::check::typeck_item_bodies
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>::typeck_item_bodies
28: rustc_session::utils::<impl rustc_session::session::Session>::time
29: rustc_typeck::check_crate
30: rustc_interface::passes::analysis
31: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
32: rustc_data_structures::stack::ensure_sufficient_stack
33: rustc_query_system::query::plumbing::force_query_with_job
34: rustc_query_system::query::plumbing::get_query_impl
35: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
36: rustc_interface::passes::QueryContext::enter
37: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
38: rustc_span::with_source_map
39: rustc_interface::interface::create_compiler_and_run
40: 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
query stack during panic:
#0 [typeck] type-checking `main`
#1 [typeck_item_bodies] type-checking all item bodies
#2 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0152, E0658.
For more information about an error, try `rustc --explain E0152`.
Metadata
Metadata
Assignees
Labels
Category: This is a bug.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.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.