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

rustc failure with unwrap_or(fail!()) #13202

Closed
TeXitoi opened this issue Mar 29, 2014 · 3 comments · Fixed by #17199
Closed

rustc failure with unwrap_or(fail!()) #13202

TeXitoi opened this issue Mar 29, 2014 · 3 comments · Fixed by #17199
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@TeXitoi
Copy link
Contributor

TeXitoi commented Mar 29, 2014

fn main() { Some("foo").unwrap_or(fail!("bad input")).to_str(); }

It gives

$ RUST_BACKTRACE=1 ~/hack/local/bin/rustc bug.rs
bug.rs:1:13: 1:54 error: internal compiler error: &mut ! was a subtype of &mut std::cell::RefMut<,<generic #8>> but now is not?
bug.rs:1 fn main() { Some("foo").unwrap_or(fail!("bad input")).to_str(); }
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 '~Any', /home/sihem/hack/rust/src/libsyntax/diagnostic.rs:67
stack backtrace:
   1: 0xb4bf9030 - rt::backtrace::imp::write::h1d812b743a2a5dd5H2b::v0.10.pre
   2: 0xb4b610d0 - rt::unwind::begin_unwind_inner::h1599a24f6d522a09bDb::v0.10.pre
   3: 0xb4497670 - rt::unwind::begin_unwind::h4012619650b023eeeLZ::v0.10.pre
   4: 0xb4497590 - diagnostic::SpanHandler::span_bug::hc81b461721865930yQb::v0.10.pre
   5: 0xb52e5390 - driver::session::Session::span_bug::h223bf755d7ad251cKtg::v0.10.pre
   6: 0xb550ce60 - middle::typeck::check::method::LookupContext$LT$$x27a$GT$::bug::hd634aa88388202d6gm7::v0.10.pre
   7: 0xb550cf30 - middle::typeck::check::method::LookupContext$LT$$x27a$GT$::consider_candidates::hf79263880af01ab9DF6::v0.10.pre
   8: 0xb550ade0 - middle::typeck::check::method::LookupContext$LT$$x27a$GT$::search_for_method::hf5e3d94546b76b2bwA6::v0.10.pre
   9: 0xb550bfb0 - middle::typeck::check::method::LookupContext$LT$$x27a$GT$::search_for_some_kind_of_autorefd_method::h3d76c83a23852bb8Vt6::v0.10.pre
  10: 0xb5506b80 - middle::typeck::check::method::LookupContext$LT$$x27a$GT$::search_for_autoptrd_method::h0b953347da9b5eeewr6::v0.10.pre
  11: 0xb55054c0 - middle::typeck::check::method::LookupContext$LT$$x27a$GT$::search_step::h3f0d4f4959aad4f3zN5::v0.10.pre
  12: 0xb55031c0 - middle::typeck::check::method::LookupContext$LT$$x27a$GT$::search::h6d3609211c5b505b2L5::v0.10.pre
  13: 0xb5504120 - middle::typeck::check::method::lookup_in_trait::ha4c06cdd3f3ac4afkC5::v0.10.pre
  14: 0xb5504aa0 - middle::typeck::check::try_overloaded_deref::h2455f54e408cff7eoh9::v0.10.pre
  15: 0xb5506d20 - middle::typeck::check::autoderef::he1023aec635e8239sd9::v0.10.pre
  16: 0xb55027a0 - middle::typeck::check::method::lookup::h18885ebc199b2b7fov5::v0.10.pre
  17: 0xb553dac0 - middle::typeck::check::check_expr_with_unifier::hf29f194ca7d16d94BL9::v0.10.pre
  18: 0xb555ac90 - middle::typeck::check::check_stmt::ha9ed62bbe5e9a9d130b::v0.10.pre
  19: 0xb551cc40 - middle::typeck::check::check_block_with_expected::h71543058bb3824e9i5b::v0.10.pre
  20: 0xb55187e0 - middle::typeck::check::check_fn::h3ddfb987deb5a40eXJ7::v0.10.pre
  21: 0xb55185b0 - middle::typeck::check::check_bare_fn::h651db337410b36a90z7::v0.10.pre
  22: 0xb5513c00 - middle::typeck::check::check_item::h647675bcec43b722gU7::v0.10.pre
  23: 0xb55184c0 - middle::typeck::check::check_item_types::h9a22ebaf69801295Az7::v0.10.pre
  24: 0xb5648610 - middle::typeck::check_crate::closure.70961
  25: 0xb5647ed0 - util::common::time::h78bdecbabc046ef3oUg::v0.10.pre
  26: 0xb5646b20 - middle::typeck::check_crate::h5ce9ce6f613e63565ru::v0.10.pre
  27: 0xb5995a60 - driver::driver::phase_3_run_analysis_passes::h30b0cf4204c7734dYJe::v0.10.pre
  28: 0xb599c420 - driver::driver::compile_input::h5da1689b3251ee35V8e::v0.10.pre
  29: 0xb59bebd0 - run_compiler::h87588b5afbf8a370cLm::v0.10.pre
  30: 0xb59d3530 - main_args::closure.91411
  31: 0xb59d1cf0 - monitor::closure.91296
  32: 0xb59cddb0 - task::TaskBuilder::try::closure.91071
  33: 0xb773a070 - task::spawn_opts::closure.7784
  34: 0xb4bf4a00 - rt::task::Task::run::closure.41623
  35: 0xb4bf89e0 - rt::unwind::Unwinder::try::try_fn::hd39e7b0118753e02Vqb::v0.10.pre
  36: 0xb4bff6f0 - rust_try
  37: 0xb4bf48a0 - rt::task::Task::run::h734d290445a752c23t9::v0.10.pre
  38: 0xb7739e70 - task::spawn_opts::closure.7757
  39: 0xb4bf7d50 - rt::thread::thread_start::h4aca541ec265adcavaa::v0.10.pre
  40:        0x0 - <unknown>
@sfackler sfackler added I-ICE and removed I-wrong labels Mar 29, 2014
@emberian
Copy link
Member

cc @eddyb @nikomatsakis

@Sawyer47
Copy link
Contributor

Sawyer47 commented Sep 2, 2014

Looks like it no longer causes an ICE.

@TeXitoi
Copy link
Contributor Author

TeXitoi commented Sep 2, 2014

I agree, it is fixed, I close it.

@TeXitoi TeXitoi closed this as completed Sep 2, 2014
@emberian emberian reopened this Sep 2, 2014
bors added a commit that referenced this issue Sep 15, 2014
…hton

Closes #7813.
Closes #10902.
Closes #11374.
Closes #11714.
Closes #12920.
Closes #13202.
Closes #13624.
Closes #14039.
Closes #15730.
Closes #15783.
matthiaskrgr pushed a commit to matthiaskrgr/rust that referenced this issue Oct 11, 2022
Don't retry requests that have already been cancelled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants