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 on misuse of Float::powf(), Float::exp(), Float::exp2(), Float::ln(), etc. #18175

Closed
porglezomp opened this issue Oct 20, 2014 · 3 comments
Closed

Comments

@porglezomp
Copy link
Contributor

The following code ICEs

fn main() {
    Float::exp2(2.0f32); // Misuse produces ICE
}

Using the function correctly works, but I misread docs, it goes against C style and I'm not used to it, etc. etc.
It produces the following error:

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://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace

task 'rustc' failed at 'assertion failed: `(left == right) && (right == left)` (left: `3`, right: `0`)', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/librustc/middle/trans/callee.rs:528

stack backtrace:
   1:        0x11122eba9 - rt::backtrace::imp::write::h37f6a875ac6b1faadTq
   2:        0x111231e77 - failure::on_fail::ha0d7c2b5d797210dM9q
   3:        0x1114a72d5 - unwind::begin_unwind_inner::h8592212a9677a640bwd
   4:        0x1114a6f9c - unwind::begin_unwind_fmt::h6219a3bbf23fbac6Dtd
   5:        0x10e217aa5 - middle::trans::callee::trans_fn_ref_with_substs::h6f096e8e3f688f10tp3
   6:        0x10e214e51 - middle::trans::callee::trans_fn_ref::h7bbccdac16804408gd3
   7:        0x10e21dddb - middle::trans::callee::trans_call::closure.123295
   8:        0x10e1f6b14 - middle::trans::callee::trans_call_inner::h55aaa0a7bde8582abL3
   9:        0x10e21d4c7 - middle::trans::callee::trans_call::h7b4e2c8e6df15e7cwF3
  10:        0x10e22cf91 - middle::trans::expr::trans_rvalue_dps_unadjusted::h39b1e2c3f738ff77VT5
  11:        0x10e1eefd9 - middle::trans::expr::trans_into::hf8cf7932e7f2154etv4
  12:        0x10e1ee32c - middle::trans::controlflow::trans_stmt_semi::he272bee55161ef1fHK0
  13:        0x10e1ed9a0 - middle::trans::controlflow::trans_stmt::h0390fed190759d5fuG0
  14:        0x10e1ef228 - middle::trans::controlflow::trans_block::h7c868ed020abce21AL0
  15:        0x10e297ec2 - middle::trans::base::trans_closure::h25d2de8e59a72d7aDRg
  16:        0x10e1e200a - middle::trans::base::trans_fn::h10877aed033d0a4512g
  17:        0x10e1df745 - middle::trans::base::trans_item::h97c8a79a0f0fc5f8kmh
  18:        0x10e2a1308 - middle::trans::base::trans_crate::hccecf7aaa4e46ab47ji
  19:        0x10e6e5825 - driver::driver::phase_4_translate_to_llvm::h84739236ba6c4727RkA
  20:        0x10e6de1c6 - driver::driver::compile_input::h00dbfd22819e945aMRz
  21:        0x10e764a4f - driver::run_compiler::h328a12ddeecb656e6ED
  22:        0x10e762c26 - driver::run::closure.145941
  23:        0x10de75ffb - task::TaskBuilder<S>::try_future::closure.103316
  24:        0x10de75ee3 - task::TaskBuilder<S>::spawn_internal::closure.103287
  25:        0x10f07179d - task::spawn_opts::closure.8545
  26:        0x11150e89c - rust_try_inner
  27:        0x11150e886 - rust_try
  28:        0x1114a4947 - unwind::try::h830831e09adce3e0Tkd
  29:        0x1114a47cc - task::Task::run::h2ebb757597a20ac34Ac
  30:        0x10f0715c2 - task::spawn_opts::closure.8484
  31:        0x1114a618a - thread::thread_start::h2b706d41aa520cb4fVc
  32:     0x7fff87d6b772 - _pthread_start
@alexcrichton
Copy link
Member

cc @nick29581, looks UFCS-related

@nrc
Copy link
Member

nrc commented Oct 20, 2014

dup of #18061, should be fixed by #18177

@nrc nrc closed this as completed Oct 20, 2014
@nrc
Copy link
Member

nrc commented Oct 20, 2014

Please re-open if this doesn't get fixed

lnicola pushed a commit to lnicola/rust that referenced this issue Sep 25, 2024
internal: Make COMPLETION_MARKER more explicitly r-a

If a user ever sees the completion marker, it's confusing to see text about IntelliJ. Use a string that's more explicitly about completion for rust-analyzer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants