You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
our current plan to soundly support coinductive traits is to require proving the item bounds of a trait when using an implementation. Afaict this should break the following example:
traitWithSuper<T>:Copy{}traitWithAliasBound{typeAssoc:Copy;}// With our approach to coinduction, using this impl should require// proving `<T as WithAliasBound>::Assoc: Copy`impl<T:WithAliasBound>WithSuper<T>for <TasWithAliasBound>::Assoc{}fnimpls_with_super<T:WithSuper<U>,U>(){}fnitem_bounds_not_checked<T:WithAliasBound<Assoc = U>,U>(){impls_with_super::<U,T>();// This uses the impl and would fail to prove `U: Copy`.}
yes it would, had the same convo with @BoxyUwU rn 😆 doing so is non-trivial however.
Instead of T: WithAliasBound<Assoc = U> you can have T: WithIntoIteratorAliasBound<Assoc = Vec<U>>. So if you now add Vec<u32>: IntoIterator into the environment it probably shadows the actual impl, preventing you from normalizing <Vec<u32> as IntoIterator>::Item. We probably want param env Trait-candidates to prevent normalizing via impls due to #76/#12
our current plan to soundly support coinductive traits is to require proving the item bounds of a trait when using an implementation. Afaict this should break the following example:
related issues
delay_span_bug
:error performing ParamEnvAnd
rust#103899The text was updated successfully, but these errors were encountered: