Deref
and DerefMut
cause ambiguity issues when resolving
#3032
Labels
Deref
and DerefMut
cause ambiguity issues when resolving
#3032
This code is the base implementation of
Deref
andDerefMut
:If we remove the
#[lang = "deref{_mut}"]
attributes, then the code works, but otherwise it errors out:the reason is that there is an ambiguity and that the compiler finds two associated trait impls:
Deref
for&mut T
andDeref
for&T
The text was updated successfully, but these errors were encountered: