Skip to content

internal compiler error: unexpected callee type core::ops::FnOnce() -> S #20904

@yggie

Description

@yggie

I got this error while updating my code with the latest rust version:

internal compiler error: unexpected callee type core::ops::FnOnce() -> S

This is the output from the compiler:

note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/libsyntax/diagnostic.rs:123

stack backtrace:
   1:        0x110a454b5 - sys::backtrace::write::h64ca2fb259c4ae97lCt
   2:        0x110a6794f - failure::on_fail::h64ff5ae6887860cc0Hz
   3:        0x1109d35ca - rt::unwind::begin_unwind_inner::h1d4bc098fd350446Qpz
   4:        0x10e6d40b7 - rt::unwind::begin_unwind::h1123425023578864118
   5:        0x10e6d404c - diagnostic::SpanHandler::span_bug::he8deb1e61e0360e4nQF
   6:        0x10dafd9cd - session::Session::span_bug::h67200d92e3673ccdYQq
   7:        0x10d81168f - middle::expr_use_visitor::ExprUseVisitor<'d, 't, 'tcx, TYPER>::walk_expr::h6575609680245155147
   8:        0x10d80fc67 - middle::expr_use_visitor::ExprUseVisitor<'d, 't, 'tcx, TYPER>::walk_block::h13779607119058279926
   9:        0x10d809391 - check::upvar::AdjustBorrowKind<'a, 'tcx>::analyze_fn::hdfb8dd43bf97b477vji
  10:        0x10d833bb9 - check::check_bare_fn::h92d153344310f88bH3j
  11:        0x10d82b6f5 - check::check_item::hffd8f154a5736127umk
  12:        0x10d8335e2 - visit::walk_mod::h2814595271141058644
  13:        0x10d8335ed - visit::walk_mod::h2814595271141058644
  14:        0x10d8f307a - check_crate::unboxed_closure.30671
  15:        0x10d8ee873 - check_crate::h32fc7f8788be683523x
  16:        0x10d25c982 - driver::phase_3_run_analysis_passes::h4c5cf0d8fe5d55degwa
  17:        0x10d243420 - driver::compile_input::h31580cbd7ea87613xba
  18:        0x10d30efda - monitor::unboxed_closure.22557
  19:        0x10d30d735 - thunk::F.Invoke<A, R>::invoke::h6367419564961841226
  20:        0x10d30c510 - rt::unwind::try::try_fn::h7763956589852599824
  21:        0x110ace2a9 - rust_try_inner
  22:        0x110ace296 - rust_try
  23:        0x10d30cc0c - thunk::F.Invoke<A, R>::invoke::h16724184168577887652
  24:        0x110a55154 - sys::thread::thread_start::hbd8f2f8bdd3a3baadrw
  25:     0x7fff888182fc - _pthread_body
  26:     0x7fff88818279 - _pthread_body

This is the output from rustc --version --verbose:

rustc 1.0.0-nightly (44a287e6e 2015-01-08 17:03:40 -0800)
binary: rustc
commit-hash: 44a287e6eb22ec3c2a687fc156813577464017f7
commit-date: 2015-01-08 17:03:40 -0800
host: x86_64-apple-darwin
release: 1.0.0-nightly

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-closuresArea: Closures (`|…| { … }`)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions