rust-lang / rust-lang/rust

encountered incremental compilation error with impl_trait_ref

Open
#118,576 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-incr-comp C-bug I-ICE T-compiler
Dominant language
Rust
Stars
119k
Forks
16.2k
PR merge metrics
PR metrics pending

Description

Code

This tarball contains the whole workspace directory in which I encountered this ICE. Run cargo test --package yash-builtin --lib -- getopts::report::tests --nocapture in the home/magicant/Projects/yash-rs directory to (hopefully) reproduce the ICE.

Meta

rustc --version --verbose:

rustc 1.73.0 (cc66ad468 2023-10-03)
binary: rustc
commit-hash: cc66ad468955717ab92600c770da8c1601a4ff33
commit-date: 2023-10-03
host: x86_64-unknown-linux-gnu
release: 1.73.0
LLVM version: 17.0.2
Error output
   Compiling yash-builtin v0.1.0 (/home/magicant/Projects/yash-rs/yash-builtin)
error: internal compiler error: encountered incremental compilation error with impl_trait_ref(yash_env[d20e]::system::virtual::file_system::{impl#13})
  |
  = help: This is a known issue with the compiler. Run `cargo clean -p yash_builtin` 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 /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/compiler/rustc_query_system/src/query/plumbing.rs:736:9:
Found unstable fingerprints for impl_trait_ref(yash_env[d20e]::system::virtual::file_system::{impl#13}): Some(EarlyBinder { value: <yash_env::system::r#virtual::FileSystem as std::cmp::Eq> })
stack backtrace:
   0:     0x7fa2eef6349c - std::backtrace_rs::backtrace::libunwind::trace::he43a6a3949163f8c
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fa2eef6349c - std::backtrace_rs::backtrace::trace_unsynchronized::h50db52ca99f692e7
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fa2eef6349c - std::sys_common::backtrace::_print_fmt::hd37d595f2ceb2d3c
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7fa2eef6349c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h678bbcf9da6d7d75
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7fa2eefc93fc - core::fmt::rt::Argument::fmt::h3a159adc080a6fc9
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/rt.rs:138:9
   5:     0x7fa2eefc93fc - core::fmt::write::hb8eaf5a8e45a738e
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/mod.rs:1094:21
   6:     0x7fa2eef5612e - std::io::Write::write_fmt::h9663fe36b2ee08f9
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/io/mod.rs:1714:15
   7:     0x7fa2eef63284 - std::sys_common::backtrace::_print::hcd4834796ee88ad2
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7fa2eef63284 - std::sys_common::backtrace::print::h1360e9450e4f922a
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7fa2eef66193 - std::panicking::default_hook::{{closure}}::h2609fa95cd5ab1f4
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:270:22
  10:     0x7fa2eef65eac - std::panicking::default_hook::h6d75f5747cab6e8d
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:290:9
  11:     0x7fa2f2130a3e - <alloc[98253621d83cbf53]::boxed::Box<rustc_driver_impl[566d207f92c3d9d2]::install_ice_hook::{closure#0}> as core[d28c4e8d9c4eebaa]::ops::function::Fn<(&dyn for<'a, 'b> core[d28c4e8d9c4eebaa]::ops::function::Fn<(&'a core[d28c4e8d9c4eebaa]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[d28c4e8d9c4eebaa]::marker::Sync + core[d28c4e8d9c4eebaa]::marker::Send, &core[d28c4e8d9c4eebaa]::panic::panic_info::PanicInfo)>>::call
  12:     0x7fa2eef669be - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h05249de742e1768e
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2021:9
  13:     0x7fa2eef669be - std::panicking::rust_panic_with_hook::h57e78470c47c84de
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:711:13
  14:     0x7fa2eef66747 - std::panicking::begin_panic_handler::{{closure}}::h3dfd2453cf356ecb
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:599:13
  15:     0x7fa2eef639c6 - std::sys_common::backtrace::__rust_end_short_backtrace::hdb177d43678e4d7e
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:170:18
  16:     0x7fa2eef66492 - rust_begin_unwind
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:595:5
  17:     0x7fa2eefc5803 - core::panicking::panic_fmt::hd1e971d8d7c78e0e
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:67:14
  18:     0x7fa2f29da41b - rustc_query_system[e0e328d29a6e1c80]::query::plumbing::incremental_verify_ich_failed::<rustc_middle[5935fdd60c99b3fe]::ty::context::TyCtxt>
  19:     0x7fa2f0b1a109 - rustc_query_system[e0e328d29a6e1c80]::query::plumbing::try_execute_query::<rustc_query_impl[778daaabc67f3fff]::DynamicConfig<rustc_query_system[e0e328d29a6e1c80]::query::caches::DefaultCache<rustc_span[4c9f011e8b033119]::def_id::DefId, rustc_middle[5935fdd60c99b3fe]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[778daaabc67f3fff]::plumbing::QueryCtxt, true>
  20:     0x7fa2f1aa03cd - rustc_query_impl[778daaabc67f3fff]::query_impl::impl_trait_ref::get_query_incr::__rust_end_short_backtrace
  21:     0x7fa2f130023e - rustc_trait_selection[48b7f7e13fbddf35]::traits::specialize::specialization_graph_provider
  22:     0x7fa2f1577a1b - rustc_query_impl[778daaabc67f3fff]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[778daaabc67f3fff]::query_impl::specialization_graph_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[5935fdd60c99b3fe]::query::erase::Erased<[u8; 8usize]>>
  23:     0x7fa2f15779f1 - <rustc_query_impl[778daaabc67f3fff]::query_impl::specialization_graph_of::dynamic_query::{closure#2} as core[d28c4e8d9c4eebaa]::ops::function::FnOnce<(rustc_middle[5935fdd60c99b3fe]::ty::context::TyCtxt, rustc_span[4c9f011e8b033119]::def_id::DefId)>>::call_once
  24:     0x7fa2f0c488cb - rustc_query_system[e0e328d29a6e1c80]::query::plumbing::try_execute_query::<rustc_query_impl[778daaabc67f3fff]::DynamicConfig<rustc_query_system[e0e328d29a6e1c80]::query::caches::DefaultCache<rustc_span[4c9f011e8b033119]::def_id::DefId, rustc_middle[5935fdd60c99b3fe]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[778daaabc67f3fff]::plumbing::QueryCtxt, true>
  25:     0x7fa2f130ac92 - rustc_query_system[e0e328d29a6e1c80]::query::plumbing::force_query::<rustc_query_impl[778daaabc67f3fff]::DynamicConfig<rustc_query_system[e0e328d29a6e1c80]::query::caches::DefaultCache<rustc_span[4c9f011e8b033119]::def_id::DefId, rustc_middle[5935fdd60c99b3fe]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[778daaabc67f3fff]::plumbing::QueryCtxt>
  26:     0x7fa2f1a7c3c1 - <rustc_query_impl[778daaabc67f3fff]::plumbing::query_callback<rustc_query_impl[778daaabc67f3fff]::query_impl::specialization_graph_of::QueryType>::{closure#0} as core[d28c4e8d9c4eebaa]::ops::function::FnOnce<(rustc_middle[5935fdd60c99b3fe]::ty::context::TyCtxt, rustc_query_system[e0e328d29a6e1c80]::dep_graph::dep_node::DepNode<rustc_middle[5935fdd60c99b3fe]::dep_graph::dep_node::DepKind>)>>::call_once
  27:     0x7fa2f0342e98 - <rustc_query_system[e0e328d29a6e1c80]::dep_graph::graph::DepGraphData<rustc_middle[5935fdd60c99b3fe]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[778daaabc67f3fff]::plumbing::QueryCtxt>
  28:     0x7fa2f0f7f69f - <rustc_query_system[e0e328d29a6e1c80]::dep_graph::graph::DepGraph<rustc_middle[5935fdd60c99b3fe]::dep_graph::dep_node::DepKind>>::try_mark_green::<rustc_query_impl[778daaabc67f3fff]::plumbing::QueryCtxt>
  29:     0x7fa2f182dffd - rustc_query_system[e0e328d29a6e1c80]::query::plumbing::ensure_must_run::<rustc_query_impl[778daaabc67f3fff]::DynamicConfig<rustc_query_system[e0e328d29a6e1c80]::query::caches::DefaultCache<rustc_span[4c9f011e8b033119]::def_id::DefId, rustc_middle[5935fdd60c99b3fe]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[778daaabc67f3fff]::plumbing::QueryCtxt>
  30:     0x7fa2f182ddf9 - rustc_query_impl[778daaabc67f3fff]::query_impl::coherent_trait::get_query_incr::__rust_end_short_backtrace
  31:     0x7fa2f12f7a5e - rustc_hir_analysis[9bbb5014796bfef7]::check_crate
  32:     0x7fa2f12ee49a - rustc_interface[5bdd18de9f5858d8]::passes::analysis
  33:     0x7fa2f163670a - rustc_query_impl[778daaabc67f3fff]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[778daaabc67f3fff]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[5935fdd60c99b3fe]::query::erase::Erased<[u8; 1usize]>>
  34:     0x7fa2f16366f9 - <rustc_query_impl[778daaabc67f3fff]::query_impl::analysis::dynamic_query::{closure#2} as core[d28c4e8d9c4eebaa]::ops::function::FnOnce<(rustc_middle[5935fdd60c99b3fe]::ty::context::TyCtxt, ())>>::call_once
  35:     0x7fa2f191d898 - rustc_query_system[e0e328d29a6e1c80]::query::plumbing::try_execute_query::<rustc_query_impl[778daaabc67f3fff]::DynamicConfig<rustc_query_system[e0e328d29a6e1c80]::query::caches::SingleCache<rustc_middle[5935fdd60c99b3fe]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[778daaabc67f3fff]::plumbing::QueryCtxt, true>
  36:     0x7fa2f191d3f4 - rustc_query_impl[778daaabc67f3fff]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  37:     0x7fa2f13e2973 - <rustc_interface[5bdd18de9f5858d8]::queries::QueryResult<&rustc_middle[5935fdd60c99b3fe]::ty::context::GlobalCtxt>>::enter::<core[d28c4e8d9c4eebaa]::result::Result<(), rustc_span[4c9f011e8b033119]::ErrorGuaranteed>, rustc_driver_impl[566d207f92c3d9d2]::run_compiler::{closure#1}::{closure#2}::{closure#6}>
  38:     0x7fa2f13e194a - <rustc_interface[5bdd18de9f5858d8]::interface::Compiler>::enter::<rustc_driver_impl[566d207f92c3d9d2]::run_compiler::{closure#1}::{closure#2}, core[d28c4e8d9c4eebaa]::result::Result<core[d28c4e8d9c4eebaa]::option::Option<rustc_interface[5bdd18de9f5858d8]::queries::Linker>, rustc_span[4c9f011e8b033119]::ErrorGuaranteed>>
  39:     0x7fa2f13dec68 - std[3759e478f3a6c4f2]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[5bdd18de9f5858d8]::util::run_in_thread_pool_with_globals<rustc_interface[5bdd18de9f5858d8]::interface::run_compiler<core[d28c4e8d9c4eebaa]::result::Result<(), rustc_span[4c9f011e8b033119]::ErrorGuaranteed>, rustc_driver_impl[566d207f92c3d9d2]::run_compiler::{closure#1}>::{closure#0}, core[d28c4e8d9c4eebaa]::result::Result<(), rustc_span[4c9f011e8b033119]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[d28c4e8d9c4eebaa]::result::Result<(), rustc_span[4c9f011e8b033119]::ErrorGuaranteed>>
  40:     0x7fa2f13de3ee - <<std[3759e478f3a6c4f2]::thread::Builder>::spawn_unchecked_<rustc_interface[5bdd18de9f5858d8]::util::run_in_thread_pool_with_globals<rustc_interface[5bdd18de9f5858d8]::interface::run_compiler<core[d28c4e8d9c4eebaa]::result::Result<(), rustc_span[4c9f011e8b033119]::ErrorGuaranteed>, rustc_driver_impl[566d207f92c3d9d2]::run_compiler::{closure#1}>::{closure#0}, core[d28c4e8d9c4eebaa]::result::Result<(), rustc_span[4c9f011e8b033119]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[d28c4e8d9c4eebaa]::result::Result<(), rustc_span[4c9f011e8b033119]::ErrorGuaranteed>>::{closure#1} as core[d28c4e8d9c4eebaa]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  41:     0x7fa2eef71295 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::haadd4e5af2ab0d62
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9
  42:     0x7fa2eef71295 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he4ba1fb09c16d807
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9
  43:     0x7fa2eef71295 - std::sys::unix::thread::Thread::new::thread_start::he524ecf4b47bee95
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys/unix/thread.rs:108:17
  44:     0x7fa2eecf0897 - start_thread
  45:     0x7fa2eed776bc - clone3
  46:                0x0 - <unknown>

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.73.0 (cc66ad468 2023-10-03) running on x86_64-unknown-linux-gnu

note: compiler flags: -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:
error: could not compile `yash-builtin` (lib test) due to previous error

Caused by:
  process didn't exit successfully: `/home/magicant/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name yash_builtin --edition=2021 yash-builtin/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=168 --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --test --cfg 'feature="default"' --cfg 'feature="yash-semantics"' -C metadata=5fa0072fe676e615 -C extra-filename=-5fa0072fe676e615 --out-dir /home/magicant/Projects/yash-rs/target/debug/deps -C incremental=/home/magicant/Projects/yash-rs/target/debug/incremental -L dependency=/home/magicant/Projects/yash-rs/target/debug/deps --extern assert_matches=/home/magicant/Projects/yash-rs/target/debug/deps/libassert_matches-29911cd135d71595.rlib --extern async_trait=/home/magicant/Projects/yash-rs/target/debug/deps/libasync_trait-af0601d91bf7dbfd.so --extern futures_executor=/home/magicant/Projects/yash-rs/target/debug/deps/libfutures_executor-d7c5e1f3efc463a5.rlib --extern futures_util=/home/magicant/Projects/yash-rs/target/debug/deps/libfutures_util-ddd17d00ac9deac4.rlib --extern thiserror=/home/magicant/Projects/yash-rs/target/debug/deps/libthiserror-fef2e4305fa6716e.rlib --extern yash_env=/home/magicant/Projects/yash-rs/target/debug/deps/libyash_env-0b43ba3573f77c2a.rlib --extern yash_quote=/home/magicant/Projects/yash-rs/target/debug/deps/libyash_quote-f082dcfb81ba5580.rlib --extern yash_semantics=/home/magicant/Projects/yash-rs/target/debug/deps/libyash_semantics-2d719cf21429105e.rlib --extern yash_syntax=/home/magicant/Projects/yash-rs/target/debug/deps/libyash_syntax-44913b2ff8686c19.rlib` (signal: 9, SIGKILL: kill)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Use the linked workspace and run cargo test --package yash-builtin --lib -- getopts::report::tests --nocapture from home/magicant/Projects/yash-rs to confirm the incremental compilation ICE. Start with the reported rustc_query_system/src/query/plumbing.rs:736 panic and the existing issue 84970, then document or fix the compiler behavior once a reproducible case is understood.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.