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

ICE: explicit failure while typechecking #14099

Closed
Ryman opened this issue May 10, 2014 · 1 comment
Closed

ICE: explicit failure while typechecking #14099

Ryman opened this issue May 10, 2014 · 1 comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@Ryman
Copy link
Contributor

Ryman commented May 10, 2014

matricks ran into this on irc.

Offending code:

fn main() {
    let x = ::std::num::Float::tan(4.0);
    println!("{}", x)
}

Should be:

fn main() {
    let x = 4.0f32.tan();
    println!("{}", x)
}

Expecting an error message about bad usage of static method rather than ICE.

failed to find block with tag 7
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 'explicit failure', /Users/kevin/Dev/Reference/rust/rust/src/libserialize/ebml.rs:227
stack backtrace:
   1:        0x1045947f4 - rt::backtrace::imp::write::h1b71907322fb2489vAa::v0.11.pre
   2:        0x1044f7066 - rt::unwind::begin_unwind_inner::h5dd8e84e23285c81Zaa::v0.11.pre
   3:        0x10422f668 - rt::unwind::begin_unwind::h0afaae50aaaa8e4eYcl::v0.11.pre
   4:        0x104230680 - ebml::Doc$LT$$x27doc$GT$::as_str_slice::h4d11c05b311f2ab9BDe::v0.11.pre
   5:        0x102079d2f - metadata::decoder::item_type::h243e5551e074f598G69::v0.11.pre
   6:        0x10207c835 - metadata::decoder::get_type::hb5582e616a907f27Wia::v0.11.pre
   7:        0x101947487 - middle::ty::lookup_item_type::h3e307c691087edcezCP::v0.11.pre
   8:        0x101c10bdc - middle::typeck::check::ty_param_bounds_and_ty_for_def::h6471f77949f8f775l4b::v0.11.pre
   9:        0x101bfd462 - middle::typeck::check::check_expr_with_unifier::h3a2740dc12cfdda2sm9::v0.11.pre
  10:        0x101bf72c6 - middle::typeck::check::check_expr_with_unifier::h3a2740dc12cfdda2sm9::v0.11.pre
  11:        0x101c121fb - middle::typeck::check::check_decl_local::h7f69b628e653f2faUAb::v0.11.pre
  12:        0x101c124c3 - middle::typeck::check::check_stmt::hf194f4385cce3706QCb::v0.11.pre
  13:        0x101bd9a9c - middle::typeck::check::check_block_with_expected::ha3e635688ace0786NGb::v0.11.pre
  14:        0x101bd575d - middle::typeck::check::check_fn::h4fb8bd0d54c30ba43p7::v0.11.pre
  15:        0x101bd4f42 - middle::typeck::check::check_bare_fn::h57e5475c845469ceVf7::v0.11.pre
  16:        0x101bd061f - middle::typeck::check::check_item::h557e59440d0ba6bf3x7::v0.11.pre
  17:        0x101bd4dbe - middle::typeck::check::check_item_types::h8c5821585584e9c0vf7::v0.11.pre
  18:        0x101d0cf5f - util::common::time::h595ba6b5ee5d9373V1g::v0.11.pre
  19:        0x101d0bc5b - middle::typeck::check_crate::ha86e8c6e5c22fa75slu::v0.11.pre
  20:        0x102120f36 - driver::driver::phase_3_run_analysis_passes::h50ae3dd75be883aeCNe::v0.11.pre
  21:        0x1021281c7 - driver::driver::compile_input::h9f557912421ed528xcf::v0.11.pre
  22:        0x10214c7bb - run_compiler::h5808939c7770316eELm::v0.11.pre
  23:        0x10216054d - main_args::closure.91893
  24:        0x10215e8d2 - monitor::closure.91771
  25:        0x10215a3fb - task::TaskBuilder::try::closure.91537
  26:        0x1044c15fc - task::spawn_opts::closure.7721
  27:        0x10458f888 - rt::task::Task::run::closure.39970
  28:        0x10459a56c - rust_try
  29:        0x10458f707 - rt::task::Task::run::ha16b6439f988f190x17::v0.11.pre
  30:        0x1044c147f - task::spawn_opts::closure.7693
  31:        0x1045931d6 - rt::thread::thread_start::hfe46724840e25704cG8::v0.11.pre
  32:     0x7fff8fe40899 - _pthread_body
  33:     0x7fff8fe4072a - _pthread_struct_init

rustc 0.11-pre (d1d8497 2014-04-18 11:41:23 -0700)
host: x86_64-apple-darwin

@alexcrichton
Copy link
Member

Closing as a dupe of #12919

bors added a commit to rust-lang-ci/rust that referenced this issue Feb 13, 2023
Properly use location links for type hints of impl Future and its assoc type
flip1995 pushed a commit to flip1995/rust that referenced this issue Feb 20, 2025
Labeled blocks cannot be used as-is in the "then" or "else" part of an
`if` expression. They must be enclosed in an anonymous block.

Fix rust-lang#14099

changelog: [`match_bool`]: fix suggestion when the rewritten block has a
label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

2 participants