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

tuple_fields called on non-tuple #78117

Closed
blasrodri opened this issue Oct 19, 2020 · 2 comments
Closed

tuple_fields called on non-tuple #78117

blasrodri opened this issue Oct 19, 2020 · 2 comments
Labels
C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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

@blasrodri
Copy link

Apologies in advance for not being able to provide a minimal snippet of the code. I'll be willing to give more info, if necessary. Bear in mind that the codebase is not open-source.

Code

<code>

Meta

rustc --version --verbose:

rustc 1.49.0-nightly (b1496c6e6 2020-10-18)
binary: rustc
commit-hash: b1496c6e606dd908dd651ac2cce89815e10d7fc5
commit-date: 2020-10-18
host: x86_64-unknown-linux-gnu
release: 1.49.0-nightly
LLVM version: 11.0

Error output

error[E0658]: use of unstable library feature 'entry_insert'
   --> api/src/node_actor.rs:147:49
    |
147 |                         m.entry(symbol.clone()).insert(price_ticker);
    |                                                 ^^^^^^
    |
    = note: see issue #65225 <https://github.com/rust-lang/rust/issues/65225> for more information
    = help: add `#![feature(entry_insert)]` to the crate attributes to enable

error[E0061]: this function takes 5 arguments but 4 arguments were supplied
   --> api/src/lib.rs:162:22
    |
162 |         tokio::spawn(NodeActor::start(pixie_channel, rx, sub, Arc::clone(&re_state)));
    |                      ^^^^^^^^^^^^^^^^ -------------  --  ---  --------------------- supplied 4 arguments
    |                      |
    |                      expected 5 arguments
    |
note: associated function defined here
   --> api/src/node_actor.rs:30:18
    |
30  |     pub async fn start(
    |                  ^^^^^
31  |         (node_tx, node_rx): (ZmqSocket, Receiver<RawMessage>),
    |         -----------------------------------------------------
32  |         mut rx: mpsc::Receiver<Envelope>,
    |         --------------------------------
33  |         sub: ZmqSocket,
    |         --------------
34  |         re_state: Arc<AtomicBool>,
    |         -------------------------
35  |         shared_tickers: crate::SharedTickers,
    |         ------------------------------------

error: internal compiler error: compiler/rustc_middle/src/ty/sty.rs:2138:18: tuple_fields called on non-tuple
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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.49.0-nightly (b1496c6e6 2020-10-18) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C codegen-units=96 -C debuginfo=2 -C incremental --crate-type lib

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

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `[closure@api/src/lib.rs:171:34: 209:6]: std::clone::Clone`
#1 [typeck] type-checking `start`
#2 [typeck_item_bodies] type-checking all item bodies
#3 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 3 previous errors; 2 warnings emitted

Some errors have detailed explanations: E0061, E0658.
For more information about an error, try `rustc --explain E0061`.
error: could not compile `api`

thread 'rustc' panicked at 'Box<Any>', compiler/rustc_errors/src/lib.rs:945:9
stack backtrace:
   0: std::panicking::begin_panic
   1: rustc_errors::HandlerInner::bug
   2: rustc_errors::Handler::bug
   3: rustc_middle::util::bug::opt_span_bug_fmt::{{closure}}
   4: rustc_middle::ty::context::tls::with_opt::{{closure}}
   5: rustc_middle::ty::context::tls::with_opt
   6: rustc_middle::util::bug::opt_span_bug_fmt
   7: rustc_middle::util::bug::bug_fmt
   8: rustc_middle::ty::sty::<impl rustc_middle::ty::TyS>::tuple_fields
   9: rustc_trait_selection::traits::select::SelectionContext::copy_clone_conditions
  10: rustc_trait_selection::traits::select::candidate_assembly::<impl rustc_trait_selection::traits::select::SelectionContext>::assemble_candidates
  11: rustc_trait_selection::traits::select::candidate_assembly::<impl rustc_trait_selection::traits::select::SelectionContext>::candidate_from_obligation_no_cache
  12: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  13: rustc_query_system::dep_graph::graph::DepGraph<K>::with_anon_task
  14: rustc_trait_selection::traits::select::candidate_assembly::<impl rustc_trait_selection::traits::select::SelectionContext>::candidate_from_obligation
  15: rustc_trait_selection::traits::select::SelectionContext::evaluate_stack
  16: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  17: rustc_query_system::dep_graph::graph::DepGraph<K>::with_anon_task
  18: rustc_trait_selection::traits::select::SelectionContext::evaluate_trait_predicate_recursively
  19: rustc_trait_selection::traits::select::SelectionContext::evaluate_predicate_recursively::{{closure}}
  20: rustc_trait_selection::traits::select::SelectionContext::evaluate_predicate_recursively
  21: rustc_infer::infer::InferCtxt::probe
  22: rustc_trait_selection::traits::select::SelectionContext::evaluate_root_obligation
  23: rustc_infer::infer::InferCtxtBuilder::enter_with_canonical
  24: rustc_traits::evaluate_obligation::evaluate_obligation
  25: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::evaluate_obligation>::compute
  26: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  27: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  28: rustc_middle::ty::query::plumbing::<impl rustc_query_system::query::QueryContext for rustc_middle::ty::context::TyCtxt>::start_query::{{closure}}::{{closure}}::{{closure}}
  29: rustc_query_system::query::plumbing::get_query_impl
  30: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation
  31: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation_no_overflow
  32: rustc_trait_selection::traits::fulfill::FulfillProcessor::process_trait_obligation
  33: rustc_trait_selection::traits::fulfill::FulfillProcessor::progress_changed_obligations
  34: rustc_data_structures::obligation_forest::ObligationForest<O>::process_obligations
  35: <rustc_trait_selection::traits::fulfill::FulfillmentContext as rustc_infer::traits::engine::TraitEngine>::select_where_possible
  36: rustc_typeck::check::fn_ctxt::_impl::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::select_obligations_where_possible
  37: rustc_infer::infer::InferCtxtBuilder::enter
  38: rustc_typeck::check::typeck
  39: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::typeck>::compute
  40: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  41: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  42: rustc_data_structures::stack::ensure_sufficient_stack
  43: rustc_query_system::query::plumbing::get_query_impl
  44: rustc_query_system::query::plumbing::ensure_query_impl
  45: rustc_typeck::check::typeck_item_bodies
  46: 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
  47: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  48: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  49: rustc_data_structures::stack::ensure_sufficient_stack
  50: rustc_query_system::query::plumbing::get_query_impl
  51: rustc_typeck::check_crate
  52: rustc_interface::passes::analysis
  53: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::analysis>::compute
  54: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  55: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  56: rustc_data_structures::stack::ensure_sufficient_stack
  57: rustc_query_system::query::plumbing::get_query_impl
  58: rustc_interface::passes::QueryContext::enter
  59: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  60: rustc_span::with_source_map
  61: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@blasrodri blasrodri 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 Oct 19, 2020
@jonas-schievink jonas-schievink added the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Oct 19, 2020
@matthiaskrgr
Copy link
Member

duplicate of #77993

@jyn514
Copy link
Member

jyn514 commented Oct 19, 2020

Closing since this is a duplicate.

@jyn514 jyn514 closed this as completed Oct 19, 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. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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

4 participants