-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
from-craterA regression found via a crater run, not part of our test suiteA regression found via a crater run, not part of our test suite
Description
pub trait Hook {
type Value;
fn use_hook(&mut self);
}
pub trait ValueGat {
type Value;
}
pub trait ErasedHook {
type ValueGat: ?Sized + ValueGat;
fn erased_use_hook(&mut self) -> <Self::ValueGat as ValueGat>::Value {
unimplemented!()
}
}
impl<H: ?Sized + Hook> ErasedHook for H {
type ValueGat = dyn ValueGat<Value = <H as Hook>::Value>;
}
impl<V: ?Sized + ValueGat> Hook for dyn '_ + ErasedHook<ValueGat = V> {
type Value = <V as ValueGat>::Value;
fn use_hook(&mut self) {
Self::erased_use_hook(self);
}
}compiles with the old solver by preferring the builtin object impl over the user written impl for ErasedHook.
The new solver fails with ambiguity. Affects hooks-core, thx @lqd. https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/crater.20triage.3A.20.60hooks-core.60.20cannot.20normalize/with/547829505
Metadata
Metadata
Assignees
Labels
from-craterA regression found via a crater run, not part of our test suiteA regression found via a crater run, not part of our test suite
Type
Projects
Status
intended breakage