-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
A-coherenceHaving to do with regressions in `-Ztrait-solver=next-coherence`Having to do with regressions in `-Ztrait-solver=next-coherence`S-breaking-change
Description
This coherence failure...
pub(crate) trait Drive {}
trait DerefAndDrive {}
impl<T> Drive for T
where
T: 'static,
for<'a> &'a T: IntoIterator,
for<'a> <&'a T as IntoIterator>::Item: DerefAndDrive,
{
}
impl Drive for () {}
fn main() {}
... is because the goal <&'a () as IntoIterator>::Item: DerefAndDrive
is considered ambiguous when unifying the two impls above. That's because we try normalizing the self type of the goal, and &'a (): IntoIterator
is treated as unknowable.
I think this is problematic, because even if we were to add an upstream implementation to be able to normalize <&'a () as IntoIterator>::Item
, it couldn't implement DerefAndDrive
since that's a trait local to the crate.
Metadata
Metadata
Assignees
Labels
A-coherenceHaving to do with regressions in `-Ztrait-solver=next-coherence`Having to do with regressions in `-Ztrait-solver=next-coherence`S-breaking-change