Skip to content

Panic when using an undeclared module #8256

Closed
@dvtkrlbs

Description

@dvtkrlbs

getting a panic on use of undeclared module. will try to create minimal reproduce repo

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/compiler/rustc_hir/src/definitions.rs:452:14
stack backtrace:
   0:        0x101cf790c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h8483effd3e9ec544
   1:        0x101d41164 - core::fmt::write::ha34752bcd39bca36
   2:        0x101ce90c0 - std::io::Write::write_fmt::hfc57a6e48a9ddae2
   3:        0x101cfa79c - std::panicking::default_hook::{{closure}}::he9aaba83dd453f35
   4:        0x101cfa37c - std::panicking::default_hook::hc87ff103cfd8260f
   5:        0x100ecc348 - clippy_driver::ICE_HOOK::{{closure}}::{{closure}}::h5a0dbb480ca0bfbc
   6:        0x101cfaf70 - std::panicking::rust_panic_with_hook::hf890018b6cf19ef5
   7:        0x101cfaa68 - std::panicking::begin_panic_handler::{{closure}}::hc0918e64b5d68f06
   8:        0x101cf7dcc - std::sys_common::backtrace::__rust_end_short_backtrace::hb99d925d54d4af60
   9:        0x101cfa9f8 - _rust_begin_unwind
  10:        0x101d6a4b0 - core::panicking::panic_fmt::hf9e85df46ac02a7d
  11:        0x101d6a434 - core::panicking::panic::hedf83d3b66d674c2
  12:        0x10b5e0ec8 - <rustc_query_impl::on_disk_cache::OnDiskCache as rustc_middle::ty::context::OnDiskCache>::def_path_hash_to_def_id::hd20b1e134d4200d3
  13:        0x10c069fa0 - rustc_middle::dep_graph::dep_node::<impl rustc_query_system::dep_graph::dep_node::DepNodeParams<rustc_middle::ty::context::TyCtxt> for rustc_span::def_id::LocalDefId>::recover::h26d425b4c23ceea8
  14:        0x10b51d4ac - rustc_query_impl::query_callbacks::hir_owner::force_from_dep_node::hafb76e9dab1fb529
  15:        0x10b56c6b0 - rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green::h7d9c6a5a7705692a
  16:        0x10b56c684 - rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green::h7d9c6a5a7705692a
  17:        0x10b56c684 - rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green::h7d9c6a5a7705692a
  18:        0x10b56c684 - rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green::h7d9c6a5a7705692a
  19:        0x10b53a910 - rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_green::h0a6c0abe780b7ab6
  20:        0x10b321724 - rustc_query_system::query::plumbing::ensure_must_run::he4167e7c83079daa
  21:        0x10b404440 - rustc_query_system::query::plumbing::get_query::h82650e1469166e78
  22:        0x10aabf918 - rustc_session::session::Session::track_errors::h4527395f8f1bf254
  23:        0x10aa891d0 - rustc_typeck::check_crate::h283f4acefee144a6
  24:        0x1088610fc - rustc_interface::passes::analysis::h2153abe78a871b9c
  25:        0x10b583cc8 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task::h4f9b5b03cb3cee09
  26:        0x10b4b7b38 - rustc_data_structures::stack::ensure_sufficient_stack::h2f279a65e5c939f8
  27:        0x10b389890 - rustc_query_system::query::plumbing::try_execute_query::hd1842ab937ef6c06
  28:        0x10b3fe654 - rustc_query_system::query::plumbing::get_query::h55349ee72a45a8ba
  29:        0x1087bc12c - rustc_interface::passes::QueryContext::enter::hbe469b3e41f9d4d9
  30:        0x10879dd2c - rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter::h115932c1213f9bac
  31:        0x108772b70 - rustc_span::with_source_map::h7719c0be7184704a
  32:        0x10879cbd8 - scoped_tls::ScopedKey<T>::set::h3629eeeca22f8b27
  33:        0x108776900 - std::sys_common::backtrace::__rust_begin_short_backtrace::h5b2deae835685f5b
  34:        0x1087c1558 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hb42a090ced359dc6
  35:        0x101d042e4 - std::sys::unix::thread::Thread::new::thread_start::hb0ee8a3c2c47a737
  36:        0x187eb5240 - __pthread_deallocate

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: Clippy 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