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

thread 'rustc' panicked at 'called Option::unwrap() on a None value', src/librustc/hir/mod.rs:81:37 #70353

Closed
staktrace opened this issue Mar 24, 2020 · 4 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@staktrace
Copy link
Contributor

Code

git clone https://github.com/docopt/docopt.rs
cd docopt.rs
git reset --hard 1.1.0
cargo build --release --verbose

Meta

rustc --version --verbose:

rustc 1.44.0-nightly (f509b26a7 2020-03-18)
binary: rustc
commit-hash: f509b26a7730d721ef87423a72b3fdf8724b4afa
commit-date: 2020-03-18
host: x86_64-unknown-linux-gnu
release: 1.44.0-nightly
LLVM version: 9.0

Error output

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src/librustc/hir/mod.rs:81:37
note: run with `RUST_BACKTRACE=1` environment variable to display a 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.44.0-nightly (f509b26a7 2020-03-18) running on x86_64-unknown-linux-gnu

note: compiler flags: -C opt-level=3 --crate-type bin

note: some of the compiler flags provided by cargo are hidden

error: could not compile `docopt`.

Caused by:
  process didn't exit successfully: `rustc --crate-name docopt_wordlist --edition=2018 src/wordlist.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C metadata=29b01667b3ffabde -C extra-filename=-29b01667b3ffabde --out-dir /home/ubuntu/docopt.rs/target/release/deps -L dependency=/home/ubuntu/docopt.rs/target/release/deps --extern docopt=/home/ubuntu/docopt.rs/target/release/deps/libdocopt-2fe2a3326b9dd8cc.rlib --extern lazy_static=/home/ubuntu/docopt.rs/target/release/deps/liblazy_static-998e5d1115c8a9cd.rlib --extern regex=/home/ubuntu/docopt.rs/target/release/deps/libregex-b98fc02de35a0584.rlib --extern serde=/home/ubuntu/docopt.rs/target/release/deps/libserde-142eefc639cfe4cb.rlib --extern strsim=/home/ubuntu/docopt.rs/target/release/deps/libstrsim-81d38e34be74e3cb.rlib` (exit code: 101)
Backtrace

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src/librustc/hir/mod.rs:81:37
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/git.luolix.top-1ecc6299db9ec823/backtrace-0.3.44/src/backtrace/libunwind.rs:86
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/git.luolix.top-1ecc6299db9ec823/backtrace-0.3.44/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:78
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1069
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1427
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:198
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:218
  10: rustc_driver::report_ice
  11: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:515
  12: rust_begin_unwind
             at src/libstd/panicking.rs:419
  13: core::panicking::panic_fmt
             at src/libcore/panicking.rs:111
  14: core::panicking::panic
             at src/libcore/panicking.rs:54
  15: core::ops::function::FnOnce::call_once
  16: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::hir_owner>::compute
  17: rustc::dep_graph::graph::DepGraph::with_task_impl
  18: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  19: rustc::hir::map::Map::get_entry
  20: rustc::hir::map::Map::find
  21: rustc_passes::dead::MarkSymbolVisitor::check_def_id
  22: rustc_hir::intravisit::walk_item
  23: rustc_passes::dead::check_crate
  24: rustc_session::utils::<impl rustc_session::session::Session>::time
  25: rustc_interface::passes::analysis::{{closure}}::{{closure}}
  26: rustc_session::utils::<impl rustc_session::session::Session>::time
  27: rustc_interface::passes::analysis
  28: rustc::ty::query::__query_compute::analysis
  29: rustc::dep_graph::graph::DepGraph::with_task_impl
  30: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  31: rustc::ty::context::tls::enter_global
  32: rustc_interface::interface::run_compiler_in_existing_thread_pool
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@staktrace staktrace added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 24, 2020
@jonas-schievink
Copy link
Contributor

duplicate of #70041

@staktrace
Copy link
Contributor Author

Thanks. @jonas-schievink Tangential, but do you happen to know if there's an issue tracking the missing components in latest nightlies? i.e. when I do rustup update nightly it has to go back to the 2020-03-18 version before it finds one which has all the necessary components (more recent ones are missing things like rustfmt-preview and clippy-preview).

@jonas-schievink
Copy link
Contributor

issues for that get opened automatically, eg. #70280

@staktrace
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants