Closed
Description
fixed by preferring where-bounds over alias-bounds
pub trait QueryDb<'d>: Sized {
type DynDb: HasQueryGroup<Self::Group>;
type Group: QueryGroup;
}
pub trait QueryGroup: Sized {
type DynDb: HasQueryGroup<Self>;
}
pub trait HasQueryGroup<G>
where
G: QueryGroup,
{
}
pub trait EqualDynDb<'d, IQ: QueryDb<'d>>: QueryDb<'d> {}
impl<'d, IQ, Q> EqualDynDb<'d, IQ> for Q
where
Q: QueryDb<'d, DynDb = IQ::DynDb, Group = IQ::Group>,
Q::DynDb: HasQueryGroup<IQ::Group>,
IQ: QueryDb<'d>,
{
}
fn main() {}
results in
error[E0283]: type annotations needed: cannot satisfy `Q: EqualDynDb<'d, IQ>`
--> src/main.rs:28:40
|
28 | impl<'d, IQ, Q> EqualDynDb<'d, IQ> for Q
| ^
|
= note: cannot satisfy `Q: EqualDynDb<'d, IQ>`
= help: the trait `EqualDynDb<'_, IQ>` is implemented for `Q`
error: aborting due to 1 previous error
minimized from salsa
feels related to #89 but also affects nightly