Skip to content

closure_to_str compiler bug #13654

New issue

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

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

Already on GitHub? # to your account

Closed
alan-andrade opened this issue Apr 21, 2014 · 1 comment
Closed

closure_to_str compiler bug #13654

alan-andrade opened this issue Apr 21, 2014 · 1 comment

Comments

@alan-andrade
Copy link
Contributor

The code I was trying to compile is here

error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'assertion failed: `(left == right) && (right == left)` (left: `many`, right: `once`)', /Users/alan/dev/rust-lang/src/librustc/util/ppaux.rs:288
stack backtrace:
   1:        0x105b573c4 - rt::backtrace::imp::write::h0557c7fcf72e241dKCa::v0.11.pre
   2:        0x105ab94b6 - rt::unwind::begin_unwind_inner::heb9b1eacaba179d0Qca::v0.11.pre
   3:        0x105ab8657 - rt::unwind::begin_unwind_fmt::h1baed9020c1b0c770ba::v0.11.pre
   4:        0x102f3090c - util::ppaux::ty_to_str::h3f07564aa22e7931HJi::v0.11.pre
   5:        0x1031a76a8 - middle::typeck::infer::InferCtxt<'a>::type_error_message::h9aee6539caccb432JDp::v0.11.pre
   6:        0x1031a78ae - middle::typeck::infer::InferCtxt<'a>::report_mismatched_types::hece24e7c99998f7aQEp::v0.11.pre
   7:        0x10316f1f8 - middle::typeck::check::demand::coerce::h7d6e65f8f6180e00Oq5::v0.11.pre
   8:        0x1031b206a - middle::typeck::check::check_expr_coercable_to_type::closure.67356
   9:        0x1031a858e - middle::typeck::check::check_expr_with_unifier::hfcb6b8ef211c7999HT9::v0.11.pre
  10:        0x1031b31bc - middle::typeck::check::check_expr_with_unifier::check_argument_types::h9fb4d2d3de3b51e5LX9::v0.11.pre
  11:        0x1031b2668 - middle::typeck::check::check_expr_with_unifier::check_method_argument_types::h8df75f05d59227bcuV9::v0.11.pre
  12:        0x1031ac013 - middle::typeck::check::check_expr_with_unifier::hfcb6b8ef211c7999HT9::v0.11.pre
  13:        0x1031c591b - middle::typeck::check::check_decl_local::h338605c61d8e0f72r9b::v0.11.pre
  14:        0x1031c5be3 - middle::typeck::check::check_stmt::hd3faab041a71da8fnbc::v0.11.pre
  15:        0x10318a695 - middle::typeck::check::check_block_with_expected::h3641c89ba3e02d4fkfc::v0.11.pre
  16:        0x10318635a - middle::typeck::check::check_fn::h862281ff2ed627d5xO7::v0.11.pre
  17:        0x103185c02 - middle::typeck::check::check_bare_fn::h612fee1393554d41pE7::v0.11.pre
  18:        0x10318edca - middle::typeck::check::check_method_body::h0a8ec5dfedd0b1edQf8::v0.11.pre
  19:        0x103181826 - middle::typeck::check::check_item::h8fd4313949bc4d2ck57::v0.11.pre
  20:        0x103185a7e - middle::typeck::check::check_item_types::hbbaa10ca07e43893ZD7::v0.11.pre
  21:        0x1032c54bf - util::common::time::h16270241914666205549::v0.11.pre
  22:        0x1032c420b - middle::typeck::check_crate::h8a6c6256c783690coZu::v0.11.pre
  23:        0x1036e0d96 - driver::driver::phase_3_run_analysis_passes::h4eaff1fa898c53a6kJf::v0.11.pre
  24:        0x1036e805b - driver::driver::compile_input::hd7d65f889d8c74f2f8f::v0.11.pre
  25:        0x10370d1d0 - run_compiler::hd88f03041950be2eMEn::v0.11.pre
  26:        0x10372104d - main_args::closure.92336
  27:        0x10371f3e2 - monitor::closure.92214
  28:        0x10371af2b - task::TaskBuilder::try::closure.91980
  29:        0x102e9e65c - task::spawn_opts::closure.7787
  30:        0x105b524d8 - rt::task::Task::run::closure.40015
  31:        0x105b5d0ec - rust_try
  32:        0x105b52357 - rt::task::Task::run::hd3951958c63331b7S37::v0.11.pre
  33:        0x102e9e4df - task::spawn_opts::closure.7759
  34:        0x105b55da6 - rt::thread::thread_start::h9615c00522746630DI8::v0.11.pre
  35:     0x7fff861c3899 - _pthread_body
  36:     0x7fff861c372a - _pthread_struct_init

make: *** [test] Error 101
@alexcrichton
Copy link
Member

Closing as a dupe of #13599 (same error message)

flip1995 pushed a commit to flip1995/rust that referenced this issue Nov 7, 2024
…endoo

Swap Visitors to early exit, instead of storing poison flag

I noticed that a bunch of visitors had a `poison` or `success` field, when they could just be returning `ControlFlow`.

changelog: none
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants