This is forbidden, since deref_example.deref() must be unambiguous. Deref isn't special here, it's just another trait. Could you show how this is supposed to be used?
well, I was thinking about wrapping an Arc around a structure T that holds U1 and U2, and, wanted to be able to access the methods of U1 and U2 from the context of T (without typing t.u1.my_function() nor t.u2.my_other_function()).
In the multi-deref case, I would only need to type: t.my_function() or t.my_other_function(), and was hoping the compiler would automatically figure out which one was which, so long as there weren't overlapping method names.
It seems one way to get this to work is through macros ... a #[MultiDeref(U1=u1, U2=u2)] attribute that goes ontop of a struct where u1 is the field name with type U1, and u2 is the field name for type U2. Then, the macro could throw a compile-time error if it detected overlapping function names
This seems to be impossible for another reason: there's no way macro will know the available methods on the types. Don't forget that macros work on the syntactic level, before any type resolution.
It is true that you have to be careful with Eq, Ord, and Hash if you implement Borrow, however, you don't have to implement any of them. So it's possible to implement none of those traits, and still implement both Borrow<U> and Borrow<V> for T even though U and V don't hash/compare the same.
Of course, then you can't use any APIs that use Eq, Ord or Hash. So the only benefit Borrow<T> gives you over AsRef<T> is that it's automatically implemented for T, &T and &mut T.
There is no indicator of an issue with Borrow(Mut) for the given example. As long as you don't implement Eq, Ord, Hash for the struct you implement Borrow(Mut) for, there can't possibly be a conflict about those traits.
In that case the documentation is unclear, because "Does not compile" is a very different result from "compiles, and produces a bool". I.e. I took that language to specify that either both the borrowed and owned types should implement Eq or neither.