Repository: rust
Issue: cargo build crash after move common.rs file to subdirectory
Labels: I-ICE,T-compiler,A-incr-comp,C-bug,S-needs-repro

<!--
Thank you for finding an Internal Compiler Error! 🧊  If possible, try to provide
a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for
how to create smaller examples.
http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/
-->

### Code

```Rust
<code>
```


### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.82.0 (f6e511eec 2024-10-15)
binary: rustc
commit-hash: f6e511eec7342f59a25f7c0534f1dbea00d01b14
commit-date: 2024-10-15
host: x86_64-unknown-linux-gnu
release: 1.82.0
LLVM version: 19.1.1

```

### Error output

```
error: 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.82.0 (f6e511eec 2024-10-15) running on x86_64-unknown-linux-gnu
note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `axum::error_handling::HandleError<tower::timeout::Timeout<axum::routing::route::Route>, server::error::handle_error, (http::method::Method, http::uri::Uri)>: tower_service::Service<http::request::Request<axum_core::body::Body>>`
#1 [normalize_canonicalized_projection_ty] normalizing `<tower::util::map_request::MapRequest<tower::util::map_err::MapErr<tower::util::map_response::MapResponse<axum::error_handling::HandleError<tower::timeout::Timeout<axum::routing::route::Route>, server::error::handle_error, (http::method::Method, http::uri::Uri)>, <http::response::Response<axum_core::body::Body> as axum_core::response::into_response::IntoResponse>::into_response>, <core::convert::Infallible as core::convert::Into<core::convert::Infallible>>::into>, {closure@axum::routing::route::Route::layer<tower::builder::ServiceBuilder<tower_layer::stack::Stack<tower::timeout::layer::TimeoutLayer, tower_layer::stack::Stack<axum::error_handling::HandleErrorLayer<server::error::handle_error, (http::method::Method, http::uri::Uri)>, tower_layer::identity::Identity>>>, core::convert::Infallible>::{closure#0}}> as tower_service::Service<http::request::Request<axum_core::body::Body>>>::Response`
#2 [try_normalize_generic_arg_after_erasing_regions] normalizing `<tower::util::map_request::MapRequest<tower::util::map_err::MapErr<tower::util::map_response::MapResponse<axum::error_handling::HandleError<tower::timeout::Timeout<axum::routing::route::Route>, server::error::handle_error, (http::method::Method, http::uri::Uri)>, <http::response::Response<axum_core::body::Body> as axum_core::response::into_response::IntoResponse>::into_response>, <core::convert::Infallible as core::convert::Into<core::convert::Infallible>>::into>, {closure@axum::routing::route::Route::layer<tower::builder::ServiceBuilder<tower_layer::stack::Stack<tower::timeout::layer::TimeoutLayer, tower_layer::stack::Stack<axum::error_handling::HandleErrorLayer<server::error::handle_error, (http::method::Method, http::uri::Uri)>, tower_layer::identity::Identity>>>, core::convert::Infallible>::{closure#0}}> as tower::util::ServiceExt<http::request::Request<axum_core::body::Body>>>::map_response<<<tower::util::map_request::MapRequest<tower::util::map_err::MapErr<tower::util::map_response::MapResponse<axum::error_handling::HandleError<tower::timeout::Timeout<axum::routing::route::Route>, server::error::handle_error, (http::method::Method, http::uri::Uri)>, <http::response::Response<axum_core::body::Body> as axum_core::response::into_response::IntoResponse>::into_response>, <core::convert::Infallible as core::convert::Into<core::convert::Infallible>>::into>, {closure@axum::routing::route::Route::layer<tower::builder::ServiceBuilder<tower_layer::stack::Stack<tower::timeout::layer::TimeoutLayer, tower_layer::stack::Stack<axum::error_handling::HandleErrorLayer<server::error::handle_error, (http::method::Method, http::uri::Uri)>, tower_layer::identity::Identity>>>, core::convert::Infallible>::{closure#0}}> as tower_service::Service<http::request::Request<axum_core::body::Body>>>::Response as axum_core::response::into_response::IntoResponse>::into_response, http::response::Response<axum_core::body::Body>>`
#3 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack
there was a panic while trying to force a dep node
try_mark_green dep node stack:
#0 adt_sized_constraint(thread 'rustc' panicked at compiler/rustc_metadata/src/rmeta/def_path_hash_map.rs:23:54:
called `Option::unwrap()` on a `None` value
```

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary><strong>Backtrace</strong></summary>
<p>

```
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic
   3: core::option::unwrap_failed
   4: <rustc_query_system::dep_graph::dep_node::DepNode as rustc_middle::dep_graph::dep_node::DepNodeExt>::extract_def_id
   5: rustc_interface::callbacks::dep_node_debug
   6: <rustc_query_system::dep_graph::dep_node::DepNode as core::fmt::Debug>::fmt
   7: core::fmt::write
   8: <&std::io::stdio::Stderr as std::io::Write>::write_fmt
   9: std::io::stdio::_eprint
  10: rustc_query_system::dep_graph::graph::print_markframe_trace::<rustc_middle::dep_graph::DepsType>
  11: <rustc_query_system::dep_graph::graph::DepGraphData<rustc_middle::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
  12: <rustc_query_system::dep_graph::graph::DepGraphData<rustc_middle::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
  13: <rustc_query_system::dep_graph::graph::DepGraphData<rustc_middle::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
  14: <rustc_query_system::dep_graph::graph::DepGraphData<rustc_middle::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
  15: <rustc_query_system::dep_graph::graph::DepGraphData<rustc_middle::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
  16: <rustc_query_system::dep_graph::graph::DepGraphData<rustc_middle::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
  17: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefaultCache<rustc_type_ir::canonical::Canonical<rustc_middle::ty::context::TyCtxt, rustc_middle::ty::ParamEnvAnd<rustc_middle::ty::predicate::Predicate>>, rustc_middle::query::erase::Erased<[u8; 2]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
  18: <rustc_trait_selection::traits::fulfill::FulfillProcessor as rustc_data_structures::obligation_forest::ObligationProcessor>::process_obligation
  19: <rustc_data_structures::obligation_forest::ObligationForest<rustc_trait_selection::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection::traits::fulfill::FulfillProcessor>
  20: rustc_traits::normalize_projection_ty::normalize_canonicalized_projection_ty
      [... omitted 3 frames ...]
  21: <rustc_trait_selection::traits::query::normalize::QueryNormalizer as rustc_type_ir::fold::FallibleTypeFolder<rustc_middle::ty::context::TyCtxt>>::try_fold_ty
  22: <&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_type_ir::fold::TypeFoldable<rustc_middle::ty::context::TyCtxt>>::try_fold_with::<rustc_trait_selection::traits::query::normalize::QueryNormalizer>
  23: <rustc_trait_selection::traits::query::normalize::QueryNormalizer as rustc_type_ir::fold::FallibleTypeFolder<rustc_middle::ty::context::TyCtxt>>::try_fold_ty
  24: <&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_type_ir::fold::TypeFoldable<rustc_middle::ty::context::TyCtxt>>::try_fold_with::<rustc_trait_selection::traits::query::normalize::QueryNormalizer>
  25: <rustc_trait_selection::traits::query::normalize::QueryNormalizer as rustc_type_ir::fold::FallibleTypeFolder<rustc_middle::ty::context::TyCtxt>>::try_fold_ty
  26: <rustc_traits::normalize_erasing_regions::provide::{closure#0} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_middle::ty::ParamEnvAnd<rustc_middle::ty::generic_args::GenericArg>)>>::call_once
      [... omitted 1 frame ...]
  27: <rustc_middle::ty::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder as rustc_type_ir::fold::TypeFolder<rustc_middle::ty::context::TyCtxt>>::fold_ty
  28: rustc_monomorphize::collector::collect_items_rec::{closure#0}
  29: rustc_monomorphize::collector::collect_items_rec
  30: rustc_monomorphize::collector::collect_items_rec
  31: rustc_monomorphize::collector::collect_items_rec
  32: rustc_monomorphize::collector::collect_items_rec
  33: rustc_monomorphize::collector::collect_items_rec
  34: rustc_monomorphize::collector::collect_items_rec
  35: rustc_monomorphize::collector::collect_items_rec
  36: rustc_monomorphize::collector::collect_items_rec
  37: rustc_monomorphize::collector::collect_items_rec
  38: rustc_monomorphize::collector::collect_items_rec
  39: rustc_monomorphize::collector::collect_items_rec
  40: rustc_monomorphize::collector::collect_items_rec
  41: rustc_monomorphize::collector::collect_items_rec
  42: rustc_monomorphize::collector::collect_items_rec
  43: rustc_monomorphize::collector::collect_items_rec
  44: rustc_monomorphize::collector::collect_items_rec
  45: rustc_monomorphize::collector::collect_items_rec
  46: rustc_monomorphize::collector::collect_items_rec
  47: rustc_monomorphize::collector::collect_items_rec
  48: rustc_monomorphize::collector::collect_items_rec
  49: rustc_monomorphize::collector::collect_items_rec
  50: rustc_monomorphize::collector::collect_items_rec
  51: rustc_monomorphize::collector::collect_items_rec
  52: rustc_monomorphize::collector::collect_items_rec
  53: rustc_monomorphize::collector::collect_items_rec
  54: rustc_monomorphize::collector::collect_items_rec
  55: rustc_monomorphize::collector::collect_items_rec
  56: rustc_monomorphize::collector::collect_items_rec
  57: rustc_monomorphize::collector::collect_items_rec
  58: rustc_monomorphize::collector::collect_items_rec
  59: rustc_monomorphize::collector::collect_items_rec
  60: rustc_monomorphize::collector::collect_items_rec
  61: rustc_monomorphize::collector::collect_items_rec
  62: rustc_monomorphize::partitioning::collect_and_partition_mono_items
      [... omitted 2 frames ...]
  63: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  64: <rustc_interface::queries::Linker>::codegen_and_build_linker
  65: rustc_interface::interface::run_compiler::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}

```

</p>
</details>