Open nikomatsakis opened 2 years ago
We probably want to add a (not-provable Goal)
goal into the solver so that we can express this -- but I wouldn't want that exposed as a where-clause.
This seems closely related to coherence checks: coherence means something like Implemented T -> Implemented U -> T = U
while copy/drop has the form Implemented T -> Implemented U -> False
so I imagine that the same techniques can be used in both cases (two trait implementations in negative position)
According to https://doc.rust-lang.org/reference/special-types-and-traits.html#copy one also has to check that
Drop
is not implemented for a type that implementsCopy
. As far as I can tell this can't be stated currently as there is no logical negation nor a predicate that asserts that a trait is not implemented.Originally posted by @ltentrup in https://github.com/nikomatsakis/a-mir-formality/issues/10#issuecomment-1107448775