T -> &T, &T -> &T instead of &&T

Is there a way to define a generic / function so that, for a non-reference T, we have:

T -> &T
&T -> &T; // instead of the &&T


Borrow<T> works like that, implemented by both T and &T.


This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.