Skip to content

rustc panicked at called Option::unwrap() on a None value #45439

Description

@sebastiencs

I'm using RLS with emacs.
When I want to edit one of my files, it makes panic rustc.
There is this issue with only one file, if I edit the others files of my project rustc doesn't panic.

the backtrace:

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.22.0-nightly (4279e2b4c 2017-10-21) running on x86_64-unknown-linux-gnu

note: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', /checkout/src/libcore/option.rs:335:20
stack backtrace:
   0:     0x7fba6f610193 - std::sys::imp::backtrace::tracing::imp::unwind_backtrace::hf4c4774738282ebc
                               at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1:     0x7fba6f60a8c0 - std::sys_common::backtrace::_print::h67e30cbeb3a9aff5
                               at /checkout/src/libstd/sys_common/backtrace.rs:69
   2:     0x7fba6f61d683 - std::panicking::default_hook::{{closure}}::h9e8882ff54c6d95c
                               at /checkout/src/libstd/sys_common/backtrace.rs:58
                               at /checkout/src/libstd/panicking.rs:381
   3:     0x7fba6f61d38a - std::panicking::default_hook::hef8ffb3ced307590
                               at /checkout/src/libstd/panicking.rs:391
   4:     0x7fba6f61db47 - std::panicking::rust_panic_with_hook::h6c9860724e07ee00
                               at /checkout/src/libstd/panicking.rs:577
   5:     0x7fba6f61da14 - std::panicking::begin_panic::hf29f0ded487629a6
                               at /checkout/src/libstd/panicking.rs:538
   6:     0x7fba6f61d919 - std::panicking::begin_panic_fmt::h2add77dc33b09548
                               at /checkout/src/libstd/panicking.rs:522
   7:     0x7fba6f61d8aa - rust_begin_unwind
                               at /checkout/src/libstd/panicking.rs:498
   8:     0x7fba6f677800 - core::panicking::panic_fmt::hce5e3e24d2bb0a32
                               at /checkout/src/libcore/panicking.rs:71
   9:     0x7fba6f677736 - core::panicking::panic::h693369892c6fbda8
                               at /checkout/src/libcore/panicking.rs:51
  10:     0x7fba70d6ec2d - rustc_save_analysis::SaveContext::get_field_ref_data::hc4404f8f821b78a8
  11:     0x7fba70d49440 - <rustc_save_analysis::dump_visitor::DumpVisitor<'l, 'tcx, 'll, O>>::process_struct_lit::h4332794ac922427d
  12:     0x7fba70d5abe5 - <rustc_save_analysis::dump_visitor::DumpVisitor<'l, 'tcx, 'll, O> as syntax::visit::Visitor<'l>>::visit_expr::h88239744448623a5
  13:     0x7fba70d460db - <rustc_save_analysis::dump_visitor::DumpVisitor<'l, 'tcx, 'll, O>>::process_method::hb00ea7340dde950c
  14:     0x7fba70d4c886 - <rustc_save_analysis::dump_visitor::DumpVisitor<'l, 'tcx, 'll, O>>::process_impl_item::h11878ebf226da75b
  15:     0x7fba70d5176e - <rustc_save_analysis::dump_visitor::DumpVisitor<'l, 'tcx, 'll, O> as syntax::visit::Visitor<'l>>::visit_item::hc259e6953b1ca7c1
  16:     0x7fba70d517be - <rustc_save_analysis::dump_visitor::DumpVisitor<'l, 'tcx, 'll, O> as syntax::visit::Visitor<'l>>::visit_item::hc259e6953b1ca7c1
  17:     0x7fba70d4d108 - <rustc_save_analysis::dump_visitor::DumpVisitor<'l, 'tcx, 'll, O> as syntax::visit::Visitor<'l>>::visit_mod::h4f3e9a7d2ab348ac
  18:     0x7fba70d71f80 - <rustc_save_analysis::CallbackHandler<'b> as rustc_save_analysis::SaveHandler>::save::h7f7ba91d4947d064
  19:     0x5593fcff75c9 - <rls::build::rustc::RlsRustcCalls as rustc_driver::CompilerCalls<'a>>::build_controller::{{closure}}::h5d1fccb1e285f6c4
  20:     0x7fba710a0652 - rustc_driver::driver::compile_input::{{closure}}::h9195e4f1b4d07f93
  21:     0x7fba71029d2b - rustc::ty::context::TyCtxt::create_and_enter::h461906de72cb170d
  22:     0x7fba7109e608 - rustc_driver::driver::compile_input::ha5b788f7e127b3fe
  23:     0x7fba710ba52e - rustc_driver::run_compiler::h7b268b04258e705e
  24:     0x5593fcf4c6c9 - std::sys_common::backtrace::__rust_begin_short_backtrace::hff0dd9e89bc34313
  25:     0x5593fcf5042f - std::panicking::try::do_call::hf16f0490e66316d3
  26:     0x7fba6f666fec - __rust_maybe_catch_panic
                               at /checkout/src/libpanic_unwind/lib.rs:99
  27:     0x5593fcf9504d - <F as alloc::boxed::FnBox<A>>::call_box::h83e360660c2dd63b
  28:     0x7fba6f61c54b - std::sys::imp::thread::Thread::new::thread_start::h9c877a9bee728ced
                               at /checkout/src/liballoc/boxed.rs:772
                               at /checkout/src/libstd/sys_common/thread.rs:24
                               at /checkout/src/libstd/sys/unix/thread.rs:90
  29:     0x7fba6ef7c36c - start_thread
  30:     0x7fba6e787bbe - __GI___clone
  31:                0x0 - <unknown>

Let me know if you need any other informations

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-save-analysisArea: saving results of analyses such as inference and borrowck results to a file.C-bugCategory: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions