@@ -64,12 +64,15 @@ use self::Ordering::*;
64
64
/// Note that the `B: PartialEq<A>` (symmetric) and `A: PartialEq<C>`
65
65
/// (transitive) impls are not forced to exist, but these requirements apply
66
66
/// whenever they do exist.
67
- /// The requirement for transitive chains has a subtle consequence: if a crate `a` with type `A`
68
- /// importing types `B1`, `B2` from another crate `b` defines instances of both `A: PartialEq<B1>`
69
- /// and `B2: PartialEq<A>`, then if `b` adds a `B1: PartialEq<B2>` implementation in the future that
70
- /// could create new violations of transitivity. Effectively, crate `a` is making `B1` and `B2`
71
- /// comparable even though `b` does not permit comparing them. Crate `a` should generally refrain
72
- /// from doing that to avoid the potential for such conflicts.
67
+ /// The requirement for transitive chains has a subtle consequence: consider a crate `alpha`
68
+ /// defining type `A1` and `A2`, and a crate `beta` defining a type `B`. If `beta` uses `alpha` as a
69
+ /// dependency and provides trait implementations for both `A1: PartialEq<B>` and `B:
70
+ /// PartialEq<A2>`, the transitivity rules don't apply, as an implementation `A1: PartialEq<A2>`
71
+ /// does not exist; but at a later point `alpha` could decide to add such a `A1: PartialEq<A2>`
72
+ /// implementation, in a way that would then make `beta`'s traits implementations violate
73
+ /// transitivity. Effectively, `beta` is already making `A1` and `A2` comparable for equality even
74
+ /// though `alpha` does not permit comparing them. Crate `beta` should generally refrain from doing
75
+ /// that to avoid the potential for such conflicts.
73
76
///
74
77
/// ## Derivable
75
78
///
0 commit comments