Repository: rust
Issue: ICE when incremental compilation
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

the project is too big unfortunately. this happens when compiling 10s of files.

but the compiler told me to attach a file: 
[rust-ice.txt](https://github.com/rust-lang/rust/files/14516489/rust-ice.txt)


### 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`:
```
❯ prebuilt/third_party/rust/linux-x64/bin/rustc --version --verbose
rustc 1.78.0-nightly (8c0b4f67c 2024-02-05)
binary: rustc
commit-hash: 8c0b4f67c9b4bf477df38c16669fd576d46a2b3d
commit-date: 2024-02-05
host: x86_64-unknown-linux-gnu
release: 1.78.0-nightly
LLVM version: 17.0.6
```

### Error output

```
error: internal compiler error: encountered incremental compilation error with module_children(vfs_macros[3dbe])
  |
  = help: This is a known issue with the compiler. Run `cargo clean -p vfs` or `cargo clean` to allow your project to compile
  = note: Please follow the instructions below to create a bug report with the provided information
  = note: See <https://github.com/rust-lang/rust/issues/84970> for more information

thread 'rustc' panicked at /b/s/w/ir/x/w/fuchsia-third_party-rust/compiler/rustc_query_system/src/query/plumbing.rs:727:9:
Found unstable fingerprints for module_children(vfs_macros[3dbe]): [ModChild { ident: pseudo_directory#0, res: Def(Macro(Bang), DefId(72:25 ~ vfs_macros[3dbe]::pseudo_directory)), vis: Public, reexport_chain: [] }, ModChild { ident: mut_pseudo_directory#0, res: Def(Macro(Bang), DefId(72:26 ~ vfs_macros[3dbe]::mut_pseudo_directory)), vis: Public, reexport_chain: [] }, ModChild { ident: attribute_query#0, res: Def(Macro(Bang), DefId(72:40 ~ vfs_macros[3dbe]::attribute_query)), vis: Public, reexport_chain: [] }]
```

<!--
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>

```
error: internal compiler error: encountered incremental compilation error with module_children(vfs_macros[3dbe])
  |
  = help: This is a known issue with the compiler. Run `cargo clean -p vfs` or `cargo clean` to allow your project to compile
  = note: Please follow the instructions below to create a bug report with the provided information
  = note: See <https://github.com/rust-lang/rust/issues/84970> for more information

thread 'rustc' panicked at /b/s/w/ir/x/w/fuchsia-third_party-rust/compiler/rustc_query_system/src/query/plumbing.rs:727:9:
Found unstable fingerprints for module_children(vfs_macros[3dbe]): [ModChild { ident: pseudo_directory#0, res: Def(Macro(Bang), DefId(72:25 ~ vfs_macros[3dbe]::pseudo_directory)), vis: Public, reexport_chain: [] }, ModChild { ident: mut_pseudo_directory#0, res: Def(Macro(Bang), DefId(72:26 ~ vfs_macros[3dbe]::mut_pseudo_directory)), vis: Public, reexport_chain: [] }, ModChild { ident: attribute_query#0, res: Def(Macro(Bang), DefId(72:40 ~ vfs_macros[3dbe]::attribute_query)), vis: Public, reexport_chain: [] }]
stack backtrace:
   0: rust_begin_unwind
             at /b/s/w/ir/x/w/fuchsia-third_party-rust/library/std/src/panicking.rs:647:5
   1: core::panicking::panic_fmt
             at /b/s/w/ir/x/w/fuchsia-third_party-rust/library/core/src/panicking.rs:72:14
   2: rustc_query_system::query::plumbing::incremental_verify_ich_failed::<rustc_middle::ty::context::TyCtxt>.2381
   3: rustc_query_system::query::plumbing::incremental_verify_ich::<rustc_middle::ty::context::TyCtxt, rustc_middle::query::erase::Erased<[u8; 16]>>
   4: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 16]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
   5: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 16]>>>
   6: <rustc_resolve::Resolver>::resolutions
   7: <rustc_resolve::Resolver>::resolve_ident_in_module_unadjusted_ext
   8: <rustc_resolve::Resolver>::resolve_ident_in_module_ext
   9: <rustc_resolve::Resolver>::resolve_import::{closure#0}
  10: <rustc_resolve::Resolver as rustc_expand::base::ResolverExpand>::resolve_imports
  11: <rustc_expand::expand::MacroExpander>::fully_expand_fragment
  12: <rustc_expand::expand::MacroExpander>::expand_crate
  13: <rustc_session::session::Session>::time::<rustc_ast::ast::Crate, rustc_interface::passes::configure_and_expand::{closure#1}>
  14: rustc_interface::passes::resolver_for_lowering
      [... omitted 2 frames ...]
  15: <rustc_middle::ty::context::GlobalCtxt>::enter::<rustc_driver_impl::run_compiler::{closure#0}::{closure#0}::{closure#2}, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::sync::Arc<rustc_ast::ast::Crate>)>>
  16: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#0}::{closure#0}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_span::ErrorGuaranteed>>
  17: rustc_span::set_source_map::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}::{closure#0}>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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: please attach the file at `/usr/local/google/home/yifeit/vg/out/minimal.qemu-x64/rustc-ice-2024-03-06T22_44_12-2588506.txt` to your bug report

note: compiler flags: --crate-type rlib -Z dep-info-omit-d-target -C linker=../../prebuilt/third_party/clang/linux-x64/bin/lld -C link-arg=--sysroot=x64-shared/gen/zircon/public/sysroot/cpp -C link-arg=-L../../prebuilt/third_party/clang/linux-x64/bin/../lib/x86_64-unknown-fuchsia/noexcept -C link-arg=-L../../prebuilt/third_party/clang/linux-x64/lib/clang/19/lib/x86_64-unknown-fuchsia -C link-arg=--pack-dyn-relocs=relr -C link-arg=-dynamic-linker=ld.so.1 -C link-arg=--icf=all -C link-arg=-zrel -Z remap-cwd-prefix=. -C force-frame-pointers -C opt-level=0 -C debuginfo=2 -C link-arg=--compress-debug-sections=zstd -C debug-assertions=yes -C incremental=[REDACTED] -Z allow-features= -C prefer-dynamic -C link-args=-zstack-size=0x200000 -C panic=abort -C force-unwind-tables=yes -Z panic_abort_tests -C symbol-mangling-version=v0 -C link-arg=-Bdynamic -C link-arg=x64-shared/obj/zircon/system/ulib/sync/libsync.a -C link-arg=gen/src/zircon/lib/zircon/zircon.x86_64/libzircon.so

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [module_children] collecting child items of module `vfs_macros`
#1 [resolver_for_lowering] getting the resolver for lowering
end of query stack
error: aborting due to 1 previous error
```

</p>
</details>