Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thread 'rustc' panicked at 'assertion failed: self.is_struct() || self.is_union()' #76282

Closed
smitea opened this issue Sep 3, 2020 · 1 comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@smitea
Copy link

smitea commented Sep 3, 2020

Code

Meta

rustc --version --verbose:

rustc 1.48.0-nightly (d006f5734 2020-08-28)
binary: rustc
commit-hash: d006f5734f49625c34d6fc33bf6b9967243abca8
commit-date: 2020-08-28
host: x86_64-apple-darwin
release: 1.48.0-nightly
LLVM version: 11.0

Error output

thread 'rustc' panicked at 'assertion failed: self.is_struct() || self.is_union()', src/librustc_middle/ty/mod.rs:2468:9
Backtrace

thread 'rustc' panicked at 'assertion failed: self.is_struct() || self.is_union()', src/librustc_middle/ty/mod.rs:2468:9
stack backtrace:
   0: std::panicking::begin_panic
   1: rustc_middle::ty::AdtDef::non_enum_variant
   2: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_field
   3: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
   4: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation
   5: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
   6: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation
   7: rustc_typeck::check::FnCtxt::check_stmt
   8: rustc_typeck::check::FnCtxt::check_block_with_expected
   9: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  10: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation
  11: rustc_typeck::check::_match::<impl rustc_typeck::check::FnCtxt>::check_match
  12: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  13: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation
  14: rustc_typeck::check::FnCtxt::check_block_with_expected
  15: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  16: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation
  17: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_return_expr
  18: rustc_typeck::check::check_fn
  19: rustc_typeck::check::closure::<impl rustc_typeck::check::FnCtxt>::check_expr_closure
  20: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  21: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation
  22: rustc_typeck::check::FnCtxt::check_argument_types
  23: rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::confirm_builtin_call
  24: rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::check_call
  25: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  26: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation
  27: rustc_typeck::check::FnCtxt::check_argument_types
  28: rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::confirm_builtin_call
  29: rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::check_call
  30: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  31: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation
  32: rustc_typeck::check::FnCtxt::check_stmt
  33: rustc_typeck::check::FnCtxt::check_block_with_expected
  34: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  35: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation
  36: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_return_expr
  37: rustc_typeck::check::check_fn
  38: rustc_typeck::check::closure::<impl rustc_typeck::check::FnCtxt>::check_expr_closure
  39: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  40: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation
  41: rustc_typeck::check::FnCtxt::check_argument_types
  42: rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::confirm_builtin_call
  43: rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::check_call
  44: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  45: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation
  46: rustc_typeck::check::FnCtxt::check_argument_types
  47: rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::confirm_builtin_call
  48: rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::check_call
  49: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  50: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation
  51: rustc_typeck::check::FnCtxt::check_stmt
  52: rustc_typeck::check::FnCtxt::check_block_with_expected
  53: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  54: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation
  55: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_return_expr
  56: rustc_typeck::check::check_fn
  57: rustc_infer::infer::InferCtxtBuilder::enter
  58: rustc_typeck::check::typeck
  59: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::typeck>::compute
  60: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  61: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  62: rustc_data_structures::stack::ensure_sufficient_stack
  63: rustc_query_system::query::plumbing::get_query_impl
  64: rustc_query_system::query::plumbing::ensure_query_impl
  65: rustc_typeck::check::typeck_item_bodies
  66: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::typeck_item_bodies>::compute
  67: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  68: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  69: rustc_data_structures::stack::ensure_sufficient_stack
  70: rustc_query_system::query::plumbing::get_query_impl
  71: rustc_typeck::check_crate
  72: rustc_interface::passes::analysis
  73: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::analysis>::compute
  74: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  75: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  76: rustc_data_structures::stack::ensure_sufficient_stack
  77: rustc_query_system::query::plumbing::get_query_impl
  78: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  79: rustc_span::with_source_map
  80: rustc_interface::interface::create_compiler_and_run
  81: 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.48.0-nightly (d006f5734 2020-08-28) running on x86_64-apple-darwin

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [typeck] type-checking `statement::test_without_timeout`
#1 [typeck_item_bodies] type-checking all item bodies
#2 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `bee-core`.

To learn more, run the command again with --verbose.
The terminal process "/bin/bash '-c', 'cargo test --package bee-core --lib -- datasource::debug::test --exact --nocapture'" terminated with exit code: 101.

Terminal will be reused by tasks, press any key to close it.

@smitea smitea added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 3, 2020
@jonas-schievink
Copy link
Contributor

Duplicate of #75977

@jonas-schievink jonas-schievink marked this as a duplicate of #75977 Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants