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
Chalk's strategy will solve this, but I guess that shouldn't be extremely difficult to fix even with the current strategy. The first impl is valid:
impl<T>PartialforTwhereT:Complete{}
since T: Complete indeed implies that T: Copy.
The second however, is not:
impl<T>CompleteforT{}
the impl declaration should be able to prove that T: Partial holds (ok because of the first impl), but also that T: Partial is well-formed, i.e. that T: Copy holds.
Same thing in the second example, this impl declaration:
impl<T>CompleteforT{typeAssoc = T;}
should prove that Self::Assoc: Partial<Self> (ok) and that Self::Assoc: Partial<Self> is well-formed, i.e. Self::Assoc: Copy. The latter is not being proved currently.
Activity
arielb1 commentedon Aug 10, 2017
Associated types variant, which bypasses some fixes based only on supertraits:
scalexm commentedon Aug 10, 2017
Chalk's strategy will solve this, but I guess that shouldn't be extremely difficult to fix even with the current strategy. The first impl is valid:
since
T: Completeindeed implies thatT: Copy.The second however, is not:
the impl declaration should be able to prove that
T: Partialholds (ok because of the first impl), but also thatT: Partialis well-formed, i.e. thatT: Copyholds.Same thing in the second example, this impl declaration:
should prove that
Self::Assoc: Partial<Self>(ok) and thatSelf::Assoc: Partial<Self>is well-formed, i.e.Self::Assoc: Copy. The latter is not being proved currently.Fix for the supertrait example in rust-lang#43784
Elaborate trait obligations when typechecking impls
nikomatsakis commentedon Aug 24, 2017
triage: P-high -- has pending fix
Auto merge of #43786 - scalexm:issue-43784, r=nikomatsakis
Rollup merge of rust-lang#81941 - c410-f3r:tests-tests-tests, r=petro…
Rollup merge of rust-lang#81941 - c410-f3r:tests-tests-tests, r=petro…
Rollup merge of rust-lang#81941 - c410-f3r:tests-tests-tests, r=petro…