"found unstable fingerprints for predicates_of(core[3998]::marker::Freeze)" using trybuild

347ee7f
Opened by Erlend Langseth at 2023-10-23 13:30:00

Code

https://github.com/ploppz/diesel/tree/ice

cd diesel/diesel_compile_tests
cargo test

If that doesn't reproduce the issue, I was first on this commit https://github.com/Ploppz/diesel/commit/b369c8a9f889e21b5b2bdccee6d35268bf4382f1 running cargo test without trouble, before I did the changes in the ice branch and tried again to cargo test.

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.53.0-nightly (4fdac23f3 2021-03-31)
binary: rustc
commit-hash: 4fdac23f3171e2f8864d359a21da600dd3faafc9
commit-date: 2021-03-31
host: x86_64-unknown-linux-gnu
release: 1.53.0-nightly
LLVM version: 12.0.0

Error output

thread 'rustc' panicked at 'found unstable fingerprints for predicates_of(core[3998]::marker::Freeze): GenericPredicates { parent: None, predicates: [(Binder(TraitPredicate(<Self as std::marker::Freeze>), []), /home/erlend/.rustup/toolchains/nightly-2021-04-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/marker.rs:716:1: 716:36 (#0))] }', /rustc/4fdac23f3171e2f8864d359a21da600dd3faafc9/compiler/rustc_query_system/src/query/plumbing.rs:593:5
<!-- 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>
stack backtrace:
   0: rust_begin_unwind
             at /rustc/4fdac23f3171e2f8864d359a21da600dd3faafc9/library/std/src/panicking.rs:493:5
   1: std::panicking::begin_panic_fmt
             at /rustc/4fdac23f3171e2f8864d359a21da600dd3faafc9/library/std/src/panicking.rs:435:5
   2: rustc_query_system::query::plumbing::incremental_verify_ich
   3: rustc_query_system::query::plumbing::load_from_disk_and_cache_in_memory
   4: rustc_query_system::query::plumbing::get_query_impl
   5: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::predicates_of
   6: rustc_trait_selection::traits::select::SelectionContext::impl_or_trait_obligations
   7: rustc_infer::infer::InferCtxt::commit_unconditionally
   8: rustc_trait_selection::traits::select::confirmation::<impl rustc_trait_selection::traits::select::SelectionContext>::vtable_auto_impl::{{closure}}
   9: rustc_data_structures::stack::ensure_sufficient_stack
  10: rustc_trait_selection::traits::select::confirmation::<impl rustc_trait_selection::traits::select::SelectionContext>::confirm_candidate
  11: rustc_infer::infer::InferCtxt::probe
  12: rustc_trait_selection::traits::select::SelectionContext::evaluate_candidate
  13: rustc_trait_selection::traits::select::SelectionContext::evaluate_stack
  14: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  15: rustc_query_system::dep_graph::graph::DepGraph<K>::with_anon_task
  16: rustc_trait_selection::traits::select::SelectionContext::evaluate_trait_predicate_recursively
  17: rustc_trait_selection::traits::select::SelectionContext::evaluate_predicate_recursively::{{closure}}
  18: rustc_trait_selection::traits::select::SelectionContext::evaluate_predicate_recursively
  19: rustc_infer::infer::InferCtxt::probe
  20: rustc_trait_selection::traits::select::SelectionContext::evaluate_root_obligation
  21: rustc_infer::infer::InferCtxtBuilder::enter_with_canonical
  22: rustc_traits::evaluate_obligation::evaluate_obligation
  23: rustc_query_impl::<impl rustc_query_system::query::config::QueryAccessors<rustc_query_impl::plumbing::QueryCtxt> for rustc_query_impl::queries::evaluate_obligation>::compute
  24: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  25: rustc_query_system::query::plumbing::load_from_disk_and_cache_in_memory
  26: rustc_data_structures::stack::ensure_sufficient_stack
  27: rustc_query_system::query::plumbing::get_query_impl
  28: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::evaluate_obligation
  29: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation
  30: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation_no_overflow
  31: rustc_trait_selection::traits::type_known_to_meet_bound_modulo_regions
  32: rustc_infer::infer::InferCtxtBuilder::enter
  33: rustc_ty_utils::common_traits::is_freeze_raw
  34: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  35: rustc_query_system::query::plumbing::load_from_disk_and_cache_in_memory
  36: rustc_data_structures::stack::ensure_sufficient_stack
  37: rustc_query_system::query::plumbing::get_query_impl
  38: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::is_freeze_raw
  39: rustc_middle::ty::util::<impl rustc_middle::ty::TyS>::is_freeze
  40: rustc_mir::transform::check_consts::validation::Qualifs::has_mut_interior
  41: rustc_mir::transform::check_consts::validation::Validator::qualifs_in_return_place
  42: rustc_mir::transform::mir_const_qualif
  43: core::ops::function::FnOnce::call_once
  44: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  45: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  46: rustc_data_structures::stack::ensure_sufficient_stack
  47: rustc_query_system::query::plumbing::force_query_with_job
  48: rustc_query_system::query::plumbing::get_query_impl
  49: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::mir_const_qualif
  50: rustc_mir::transform::check_consts::qualifs::in_operand
  51: rustc_mir::transform::promote_consts::Validator::qualif_local
  52: rustc_mir::transform::promote_consts::Validator::validate_ref
  53: <core::iter::adapters::copied::Copied<I> as core::iter::traits::iterator::Iterator>::try_fold
  54: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
  55: <rustc_mir::transform::promote_consts::PromoteTemps as rustc_mir::transform::MirPass>::run_pass
  56: rustc_mir::transform::run_passes
  57: rustc_mir::transform::mir_promoted
  58: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  59: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  60: rustc_data_structures::stack::ensure_sufficient_stack
  61: rustc_query_system::query::plumbing::force_query_with_job
  62: rustc_query_system::query::plumbing::get_query_impl
  63: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::mir_promoted
  64: rustc_mir::borrow_check::mir_borrowck
  65: core::ops::function::FnOnce::call_once
  66: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  67: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  68: rustc_data_structures::stack::ensure_sufficient_stack
  69: rustc_query_system::query::plumbing::force_query_with_job
  70: rustc_query_system::query::plumbing::get_query_impl
  71: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::mir_borrowck
  72: rustc_middle::ty::<impl rustc_middle::ty::context::TyCtxt>::par_body_owners
  73: rustc_interface::passes::analysis
  74: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  75: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  76: rustc_data_structures::stack::ensure_sufficient_stack
  77: rustc_query_system::query::plumbing::force_query_with_job
  78: rustc_query_system::query::plumbing::get_query_impl
  79: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
  80: rustc_interface::passes::QueryContext::enter
  81: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  82: rustc_span::with_source_map
  83: rustc_interface::interface::create_compiler_and_run
  84: scoped_tls::ScopedKey<T>::set
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.53.0-nightly (4fdac23f3 2021-03-31) running on x86_64-unknown-linux-gnu

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

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [predicates_of] computing predicates of `std::marker::Freeze`
#1 [evaluate_obligation] evaluating trait selection obligation `test::TestDescAndFn: std::marker::Freeze`
#2 [is_freeze_raw] computing whether `test::TestDescAndFn` is freeze
#3 [mir_const_qualif] const checking `trybuild`  |  = note: this failure-note originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)

#4 [mir_promoted] processing `main`
#5 [mir_borrowck] borrow-checking `main`
#6 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `diesel_compile_tests`
</p> </details>
  1. Unstable fingerprints was issue few releases earlier, try newer one.

    klensy at 2021-11-04 17:33:45

  2. @Ploppz is this issue still relevant?

    Ivan Stanković at 2023-10-22 13:19:56

  3. Not relevant for me, feel free to close.

    Erlend Langseth at 2023-10-23 13:29:24