-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustdoc: ICE: synthetic auto trait impls: unexpected result when selecting […] obligation
#91380
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
Comments
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 rust/compiler/rustc_trait_selection/src/traits/auto_trait.rs Lines 764 to 774 in 207c80f
so the obligation is 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 🤔 maybe a caching issue where |
Still panics with 1.75-nightly: rustc-ice-2023-10-22T13_45_33-85873.txt |
unexpected result when selecting […] obligation
I got one with 1.79-nightly: https://gist.github.com/neysofu/c99fe7c8bf36a30e82ea2f21a8aef27e. |
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
The text was updated successfully, but these errors were encountered: