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: In stable handling unwrap() on a None. #93507

Closed
bsodmike opened this issue Jan 31, 2022 · 2 comments
Closed

ICE: In stable handling unwrap() on a None. #93507

bsodmike opened this issue Jan 31, 2022 · 2 comments
Labels
A-incr-comp Area: Incremental compilation 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

@bsodmike
Copy link

My test suite started to die once I made some changes, but noticed it worked fine in beta.

Meta

rustc --version --verbose:

rustc 1.58.1 (db9d1b20b 2022-01-20)
binary: rustc
commit-hash: db9d1b20bba1968c1ec1fc49616d4742c1725b4b
commit-date: 2022-01-20
host: x86_64-unknown-linux-gnu
release: 1.58.1
LLVM version: 13.0.0

Error output

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', /rustc/db9d1b20bb
a1968c1ec1fc49616d4742c1725b4b/compiler/rustc_hir/src/definitions.rs:452:14
stack backtrace:
   0: rust_begin_unwind
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.r
s:498:5
   1: core::panicking::panic_fmt
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/panicking.
rs:107:14
   2: core::panicking::panic
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/panicking.
rs:48:5
   3: <rustc_middle::ty::context::TyCtxt>::def_path_hash_to_def_id
   4: <rustc_query_system::dep_graph::dep_node::DepNode<rustc_middle::dep_graph::dep_node::
DepKind> as rustc_middle::dep_graph::dep_node::DepNodeExt>::extract_def_id
   5: rustc_query_impl::query_callbacks::hir_owner::force_from_dep_node
   6: <rustc_middle::ty::context::TyCtxt as rustc_query_system::dep_graph::DepContext>::try
_force_from_dep_node
   7: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::De
pKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
   8: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::De
pKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
   9: rustc_query_system::query::plumbing::ensure_must_run::<rustc_query_impl::plumbing::Qu
eryCtxt, rustc_span::def_id::LocalDefId, &rustc_middle::ty::context::TypeckResults>
  10: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::check_mod
_liveness, rustc_query_impl::plumbing::QueryCtxt>
  11: <rustc_middle::hir::map::Map>::for_each_module::<rustc_interface::passes::analysis::{
closure#1}::{closure#1}::{closure#0}::{closure#0}>
  12: <rustc_session::session::Session>::time::<(), rustc_interface::passes::analysis::{clo
sure#1}>
  13: rustc_interface::passes::analysis
  14: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::De
pKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), core::result::Result<(), rustc_
errors::ErrorReported>>
  14: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::De
pKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), core::result::Result<(), rustc_
errors::ErrorReported>>
  15: rustc_data_structures::stack::ensure_sufficient_stack::<(core::result::Result<(), rus
tc_errors::ErrorReported>, rustc_query_system::dep_graph::graph::DepNodeIndex), rustc_query
_system::query::plumbing::execute_job<rustc_query_impl::plumbing::QueryCtxt, (), core::resu
lt::Result<(), rustc_errors::ErrorReported>>::{closure#3}>
  16: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::
QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), core::result::Result<(), rus
tc_errors::ErrorReported>>>
  17: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
  18: <rustc_interface::passes::QueryContext>::enter::<rustc_driver::run_compiler::{closure
#1}::{closure#2}::{closure#3}, core::result::Result<(), rustc_errors::ErrorReported>>
  19: <rustc_interface::interface::Compiler>::enter::<rustc_driver::run_compiler::{closure#
1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker
>, rustc_errors::ErrorReported>>
  20: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorReported>,
rustc_interface::interface::create_compiler_and_run<core::result::Result<(), rustc_errors::
ErrorReported>, rustc_driver::run_compiler::{closure#1}>::{closure#1}>
  21: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::util::set
up_callbacks_and_run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<c
ore::result::Result<(), rustc_errors::ErrorReported>, rustc_driver::run_compiler::{closure#
1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorReported>>::{closure#0}::{clo
sure#0}, core::result::Result<(), rustc_errors::ErrorReported>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 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/issues/new?labels
=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.58.1 (db9d1b20b 2022-01-20) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental

@bsodmike bsodmike 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 Jan 31, 2022
@Aaron1011 Aaron1011 added the A-incr-comp Area: Incremental compilation label Feb 1, 2022
@Aaron1011
Copy link
Member

Can you update to the latest nightly? If this issue re-occurs, then you should get a more informative error message.

@workingjubilee
Copy link
Member

Closing as a likely functional duplicate of this issue, several fixes were put in to place to resolve this, see the followup PRs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation 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

3 participants