Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upDiscourage impl of trait not in your crate for type not in your crate #138
Comments
This comment has been minimized.
This comment has been minimized.
Ixrec
commented
Jun 24, 2018
|
This seems like it's harmful primarily when the trait and type are both from |
Ixrec
referenced this issue
Jun 25, 2018
Open
Warn when a user-defined trait is used on an std library type without full path #50498
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dtolnay commentedNov 1, 2017
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