Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ice: rustdoc: assertion failed: !infcx.is_in_snapshot() || self.usable_in_snapshot #106666

Closed
matthiaskrgr opened this issue Jan 10, 2023 · 1 comment · Fixed by #107479
Closed
Assignees
Labels
A-const-generics Area: const generics (parameters and arguments) C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

Code

#![feature(generic_const_exprs)]
#![allow(incomplete_features)]

pub trait Enumerable {
    const N: usize;
}

#[derive(Clone)]
pub struct SymmetricGroup<S>
where
    S: Enumerable,
    [(); S::N]: Sized,
{
    _phantom: std::marker::PhantomData<S>,
}

fn main() {}

Meta

rustc --version --verbose:

rustdoc 1.68.0-nightly (3020239de 2023-01-09)
binary: rustdoc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.68.0-nightly
LLVM version: 15.0.6

Error output

<output>
Backtrace

thread 'rustc' panicked at 'assertion failed: !infcx.is_in_snapshot() || self.usable_in_snapshot', compiler/rustc_trait_selection/src/traits/fulfill.rs:140:9
stack backtrace:
   0:     0x7fa143f6531a - std::backtrace_rs::backtrace::libunwind::trace::hdca77ab3bec44471
                               at /rustc/3020239de947ec52677e9b4e853a6a9fc073d1f9/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fa143f6531a - std::backtrace_rs::backtrace::trace_unsynchronized::hfe4f6d6ad029d217
                               at /rustc/3020239de947ec52677e9b4e853a6a9fc073d1f9/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fa143f6531a - std::sys_common::backtrace::_print_fmt::h4c8d5d821895e43e
                               at /rustc/3020239de947ec52677e9b4e853a6a9fc073d1f9/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7fa143f6531a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h5adb97f2e886759a
                               at /rustc/3020239de947ec52677e9b4e853a6a9fc073d1f9/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7fa143fc855e - core::fmt::write::h828c59fc78b17391
                               at /rustc/3020239de947ec52677e9b4e853a6a9fc073d1f9/library/core/src/fmt/mod.rs:1208:17
   5:     0x7fa143f557f5 - std::io::Write::write_fmt::h0c8f0d571d31812a
                               at /rustc/3020239de947ec52677e9b4e853a6a9fc073d1f9/library/std/src/io/mod.rs:1682:15
   6:     0x7fa143f650e5 - std::sys_common::backtrace::_print::had90567330241219
                               at /rustc/3020239de947ec52677e9b4e853a6a9fc073d1f9/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7fa143f650e5 - std::sys_common::backtrace::print::hbbbec0560e502261
                               at /rustc/3020239de947ec52677e9b4e853a6a9fc073d1f9/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7fa143f67eaf - std::panicking::default_hook::{{closure}}::h2bb3889378be62ea
                               at /rustc/3020239de947ec52677e9b4e853a6a9fc073d1f9/library/std/src/panicking.rs:267:22
   9:     0x7fa143f67beb - std::panicking::default_hook::hd81bf40f79f1c509
                               at /rustc/3020239de947ec52677e9b4e853a6a9fc073d1f9/library/std/src/panicking.rs:286:9
  10:     0x7fa1472a25a4 - rustc_driver[f75a378c450d3976]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7fa143f686ed - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hce3fec4e8f82d2fd
                               at /rustc/3020239de947ec52677e9b4e853a6a9fc073d1f9/library/alloc/src/boxed.rs:2002:9
  12:     0x7fa143f686ed - std::panicking::rust_panic_with_hook::hed3ef434931562fa
                               at /rustc/3020239de947ec52677e9b4e853a6a9fc073d1f9/library/std/src/panicking.rs:692:13
  13:     0x7fa143f68422 - std::panicking::begin_panic_handler::{{closure}}::h1d8dbcf5f5b1c94f
                               at /rustc/3020239de947ec52677e9b4e853a6a9fc073d1f9/library/std/src/panicking.rs:577:13
  14:     0x7fa143f657cc - std::sys_common::backtrace::__rust_end_short_backtrace::hb1771d014f6a43ea
                               at /rustc/3020239de947ec52677e9b4e853a6a9fc073d1f9/library/std/src/sys_common/backtrace.rs:137:18
  15:     0x7fa143f68172 - rust_begin_unwind
                               at /rustc/3020239de947ec52677e9b4e853a6a9fc073d1f9/library/std/src/panicking.rs:575:5
  16:     0x7fa143fc4f23 - core::panicking::panic_fmt::hb8d8d3d1d1f13c08
                               at /rustc/3020239de947ec52677e9b4e853a6a9fc073d1f9/library/core/src/panicking.rs:64:14
  17:     0x7fa143fc4fbd - core::panicking::panic::hdc74384184a8bd20
                               at /rustc/3020239de947ec52677e9b4e853a6a9fc073d1f9/library/core/src/panicking.rs:114:5
  18:     0x7fa1457efe41 - <rustc_trait_selection[9743eb012b39fd0d]::traits::fulfill::FulfillmentContext as rustc_infer[60f75aa3feaaa8ad]::traits::engine::TraitEngine>::register_predicate_obligation
  19:     0x7fa145ff103a - <dyn rustc_infer[60f75aa3feaaa8ad]::traits::engine::TraitEngine as rustc_infer[60f75aa3feaaa8ad]::traits::engine::TraitEngineExt>::register_predicate_obligations::<alloc[14d1267f31994f20]::vec::Vec<rustc_infer[60f75aa3feaaa8ad]::traits::Obligation<rustc_middle[d3830b30b3b6bcb0]::ty::Predicate>>>
  20:     0x7fa147e5c6ae - <rustc_trait_selection[9743eb012b39fd0d]::traits::engine::ObligationCtxt>::register_infer_ok_obligations::<()>
  21:     0x7fa147e5cb39 - <rustc_trait_selection[9743eb012b39fd0d]::traits::engine::ObligationCtxt>::eq::<rustc_middle[d3830b30b3b6bcb0]::ty::consts::Const>
  22:     0x7fa147eac47c - rustc_trait_selection[9743eb012b39fd0d]::traits::const_evaluatable::satisfied_from_param_env
  23:     0x7fa14545e46d - rustc_trait_selection[9743eb012b39fd0d]::traits::const_evaluatable::is_const_evaluatable
  24:     0x7fa145d85487 - <rustc_trait_selection[9743eb012b39fd0d]::traits::select::SelectionContext>::evaluate_predicates_recursively::<alloc[14d1267f31994f20]::vec::into_iter::IntoIter<rustc_infer[60f75aa3feaaa8ad]::traits::Obligation<rustc_middle[d3830b30b3b6bcb0]::ty::Predicate>>>
  25:     0x7fa145d6aa91 - <rustc_trait_selection[9743eb012b39fd0d]::traits::select::SelectionContext>::evaluate_stack
  26:     0x7fa145ce89b4 - <rustc_trait_selection[9743eb012b39fd0d]::traits::select::SelectionContext>::evaluate_predicate_recursively
  27:     0x7fa145ce658a - <rustc_infer[60f75aa3feaaa8ad]::infer::InferCtxt>::probe::<core[77a23254458137f7]::result::Result<rustc_middle[d3830b30b3b6bcb0]::traits::select::EvaluationResult, rustc_middle[d3830b30b3b6bcb0]::traits::select::OverflowError>, <rustc_trait_selection[9743eb012b39fd0d]::traits::select::SelectionContext>::evaluation_probe<<rustc_trait_selection[9743eb012b39fd0d]::traits::select::SelectionContext>::evaluate_root_obligation::{closure#0}>::{closure#0}>
  28:     0x7fa145ce3e1d - rustc_traits[7dfddbd6db681657]::evaluate_obligation::evaluate_obligation
  29:     0x7fa145ce047a - rustc_query_system[9558173104ffa4a8]::query::plumbing::get_query::<rustc_query_impl[344ffabf7d0c303e]::queries::evaluate_obligation, rustc_query_impl[344ffabf7d0c303e]::plumbing::QueryCtxt, rustc_middle[d3830b30b3b6bcb0]::dep_graph::dep_node::DepKind>
  30:     0x7fa145c25111 - <rustc_infer[60f75aa3feaaa8ad]::infer::InferCtxt as rustc_trait_selection[9743eb012b39fd0d]::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation
  31:     0x563959227c8b - <rustdoc[67b20287af1b411]::clean::blanket_impl::BlanketImplFinder>::get_blanket_impls
  32:     0x563958ee958a - rustdoc[67b20287af1b411]::clean::utils::get_auto_trait_and_blanket_impls
  33:     0x56395910e902 - <rustdoc[67b20287af1b411]::passes::collect_trait_impls::SyntheticImplCollector as rustdoc[67b20287af1b411]::visit::DocVisitor>::visit_item
  34:     0x56395910ea4a - <rustdoc[67b20287af1b411]::passes::collect_trait_impls::SyntheticImplCollector as rustdoc[67b20287af1b411]::visit::DocVisitor>::visit_item
  35:     0x56395910fb71 - <rustdoc[67b20287af1b411]::passes::collect_trait_impls::SyntheticImplCollector as rustdoc[67b20287af1b411]::visit::DocVisitor>::visit_crate
  36:     0x56395913af9c - <rustc_session[47a5956f246e9bfc]::session::Session>::time::<alloc[14d1267f31994f20]::vec::Vec<rustdoc[67b20287af1b411]::clean::types::Item>, rustdoc[67b20287af1b411]::passes::collect_trait_impls::collect_trait_impls::{closure#0}>
  37:     0x56395910c66a - rustdoc[67b20287af1b411]::passes::collect_trait_impls::collect_trait_impls
  38:     0x56395913b55e - <rustc_session[47a5956f246e9bfc]::session::Session>::time::<rustdoc[67b20287af1b411]::clean::types::Crate, rustdoc[67b20287af1b411]::core::run_global_ctxt::{closure#7}>
  39:     0x5639591070d9 - rustdoc[67b20287af1b411]::core::run_global_ctxt
  40:     0x56395913b82c - <rustc_session[47a5956f246e9bfc]::session::Session>::time::<(rustdoc[67b20287af1b411]::clean::types::Crate, rustdoc[67b20287af1b411]::config::RenderOptions, rustdoc[67b20287af1b411]::formats::cache::Cache), rustdoc[67b20287af1b411]::main_args::{closure#1}::{closure#0}::{closure#1}::{closure#0}>
  41:     0x563959175edf - <rustc_interface[faf3c08608b72f36]::passes::QueryContext>::enter::<rustdoc[67b20287af1b411]::main_args::{closure#1}::{closure#0}::{closure#1}, core[77a23254458137f7]::result::Result<(), rustc_errors[515aeced1161bc4]::ErrorGuaranteed>>
  42:     0x563958eb121a - <rustc_interface[faf3c08608b72f36]::interface::Compiler>::enter::<rustdoc[67b20287af1b411]::main_args::{closure#1}::{closure#0}, core[77a23254458137f7]::result::Result<(), rustc_errors[515aeced1161bc4]::ErrorGuaranteed>>
  43:     0x56395908f71a - rustc_span[2a613a2f02b6af2c]::with_source_map::<core[77a23254458137f7]::result::Result<(), rustc_errors[515aeced1161bc4]::ErrorGuaranteed>, rustc_interface[faf3c08608b72f36]::interface::run_compiler<core[77a23254458137f7]::result::Result<(), rustc_errors[515aeced1161bc4]::ErrorGuaranteed>, rustdoc[67b20287af1b411]::main_args::{closure#1}>::{closure#0}::{closure#0}>
  44:     0x5639590348e5 - <scoped_tls[cde101c268443f1a]::ScopedKey<rustc_span[2a613a2f02b6af2c]::SessionGlobals>>::set::<rustc_interface[faf3c08608b72f36]::interface::run_compiler<core[77a23254458137f7]::result::Result<(), rustc_errors[515aeced1161bc4]::ErrorGuaranteed>, rustdoc[67b20287af1b411]::main_args::{closure#1}>::{closure#0}, core[77a23254458137f7]::result::Result<(), rustc_errors[515aeced1161bc4]::ErrorGuaranteed>>
  45:     0x5639590f0770 - std[f433d76e435f6f2]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[faf3c08608b72f36]::util::run_in_thread_pool_with_globals<rustc_interface[faf3c08608b72f36]::interface::run_compiler<core[77a23254458137f7]::result::Result<(), rustc_errors[515aeced1161bc4]::ErrorGuaranteed>, rustdoc[67b20287af1b411]::main_args::{closure#1}>::{closure#0}, core[77a23254458137f7]::result::Result<(), rustc_errors[515aeced1161bc4]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[77a23254458137f7]::result::Result<(), rustc_errors[515aeced1161bc4]::ErrorGuaranteed>>
  46:     0x5639591d76af - <<std[f433d76e435f6f2]::thread::Builder>::spawn_unchecked_<rustc_interface[faf3c08608b72f36]::util::run_in_thread_pool_with_globals<rustc_interface[faf3c08608b72f36]::interface::run_compiler<core[77a23254458137f7]::result::Result<(), rustc_errors[515aeced1161bc4]::ErrorGuaranteed>, rustdoc[67b20287af1b411]::main_args::{closure#1}>::{closure#0}, core[77a23254458137f7]::result::Result<(), rustc_errors[515aeced1161bc4]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[77a23254458137f7]::result::Result<(), rustc_errors[515aeced1161bc4]::ErrorGuaranteed>>::{closure#1} as core[77a23254458137f7]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  47:     0x7fa143f72b23 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h8f2b7af54766d232
                               at /rustc/3020239de947ec52677e9b4e853a6a9fc073d1f9/library/alloc/src/boxed.rs:1988:9
  48:     0x7fa143f72b23 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hdc261654aadd28fc
                               at /rustc/3020239de947ec52677e9b4e853a6a9fc073d1f9/library/alloc/src/boxed.rs:1988:9
  49:     0x7fa143f72b23 - std::sys::unix::thread::Thread::new::thread_start::h2ffe427b25515558
                               at /rustc/3020239de947ec52677e9b4e853a6a9fc073d1f9/library/std/src/sys/unix/thread.rs:108:17
  50:     0x7fa143d048fd - <unknown>
  51:     0x7fa143d86a60 - <unknown>
  52:                0x0 - <unknown>

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.68.0-nightly (3020239de 2023-01-09) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `SymmetricGroup<^1_0>: core::clone::Clone`
end of query stack

@matthiaskrgr matthiaskrgr added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ C-bug Category: This is a bug. labels Jan 10, 2023
@GuillaumeGomez
Copy link
Member

That seems to be something for the compiler team instead. I'll add the tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-generics Area: const generics (parameters and arguments) C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants