Discourage impl of trait not in your crate for type not in your crate #138
dtolnay
started this conversation in
API Guidelines
Replies: 1 comment 1 reply
-
This seems like it's harmful primarily when the trait and type are both from |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Such impls can lead to surprising and hard to debug inference failures in totally unrelated code. For example:
But adding this impl makes the inference break. The impl is PartialEq (not in our crate) for bool (not in our crate).
Real instance of this causing trouble: diesel-rs/diesel@1f3d7b1
Beta Was this translation helpful? Give feedback.
All reactions