Open dalcde opened 2 years ago
@BoxyUwU @lcnr do one of you happen to know what's going on here?
Slightly smaller:
pub trait Module {
type Algebra;
}
pub trait ChainComplex {
type Algebra;
type Module: Module;
}
pub struct FreeModule<A> {
foo: A,
}
impl<A> Module for FreeModule<A> {
type Algebra = A;
}
pub trait FreeChainComplex:
ChainComplex<Module = FreeModule<<Self as ChainComplex>::Algebra>>
{
}
pub struct ResolutionHomomorphism<CC2>
where
CC2: ChainComplex,
{
maps: CC2::Module,
}
pub struct SecondaryResolutionHomomorphism<
CC2: FreeChainComplex<Algebra = usize>,
> {
underlying: ResolutionHomomorphism<CC2>,
}
uh.. that seems weird
cc @nikomatsakis @jackh726
so the obligation is Obligation(predicate=Binder(ProjectionPredicate(ProjectionTy { substs: [CC2], item_def_id: DefId(0:7 ~ dep[b688]::ChainComplex::Module) }, _), []), depth=2)
with param env
ParamEnv {
caller_bounds: [
Binder(TraitPredicate(<CC2 as std::marker::Sized>, polarity:Positive), []),
Binder(TraitPredicate(<CC2 as ChainComplex>, polarity:Positive), []),
Binder(ProjectionPredicate(ProjectionTy { substs: [CC2], item_def_id: DefId(0:7 ~ dep[b688]::ChainComplex::Module) }, FreeModule<usize>), []),
Binder(TraitPredicate(<CC2 as FreeChainComplex>, polarity:Positive), []),
Binder(ProjectionPredicate(
ProjectionTy { substs: [CC2], item_def_id: DefId(0:7 ~ dep[b688]::ChainComplex::Module) },
FreeModule<<CC2 as ChainComplex>::Algebra>
), []),
Binder(ProjectionPredicate(
ProjectionTy { substs: [CC2], item_def_id: DefId(0:6 ~ dep[b688]::ChainComplex::Algebra) }, usize), [])
],
reveal: UserFacing
}
This obligation should be easily provable, so I expect there to either be a bug something bigger going wrong :thinking: maybe a caching issue where rustdoc
is using a SelectionContext
the wrong way or something?
Still panics with 1.75-nightly: rustc-ice-2023-10-22T13_45_33-85873.txt
Code
rustdoc
crashes on the following code:Meta
This crashes on both
1.54.0
,1.56.0
and nightly (2021-11-29)Error output
Backtrace
``` stack backtrace: 0: rust_begin_unwind at /rustc/6db0a0e9a4a2f55b1a85954e114ada0b45c32e45/library/std/src/panicking.rs:498:5 1: core::panicking::panic_fmt at /rustc/6db0a0e9a4a2f55b1a85954e114ada0b45c32e45/library/core/src/panicking.rs:107:14 2:::evaluate_nested_obligations::>>
3: ::evaluate_predicates
4: ::generate_for_trait
5: as alloc::vec::spec_from_iter::SpecFromIter, ::get_auto_trait_impls::{closure#0}>>>::from_iter
6: ::get_auto_trait_impls
7: rustdoc::clean::utils::get_auto_trait_and_blanket_impls
8: ::visit_item
9: ::visit_item
10: ::visit_crate
11: ::time::, rustdoc::passes::collect_trait_impls::collect_trait_impls::{closure#0}>
12: rustdoc::passes::collect_trait_impls::collect_trait_impls
13: ::time::
14: rustdoc::core::run_global_ctxt
15: ::time::<(rustdoc::clean::types::Crate, rustdoc::config::RenderOptions, rustdoc::formats::cache::Cache), rustdoc::main_options::{closure#0}::{closure#0}::{closure#0}::{closure#0}>
16: ::enter::>
17: rustc_span::with_source_map::, rustc_interface::interface::create_compiler_and_run, rustdoc::main_options::{closure#0}>::{closure#1}>
18: rustc_interface::interface::create_compiler_and_run::, rustdoc::main_options::{closure#0}>
19: rustdoc::main_options
20: >::set::>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorReported>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
error: internal compiler error: unexpected panic
error: Unrecognized option: 'crate-version'
error: could not document `ice`
Caused by:
process didn't exit successfully: `rustdoc --edition=2018 --crate-type lib --crate-name ice src/lib.rs -o /tmp/ice/target/doc --error-format=json --json=diagnostic-rendered-ansi -C metadata=75642385eb1e00a4 -L dependency=/tmp/ice/target/debug/deps --crate-version 0.1.0` (exit status: 1)
```