NeuroWhAI의 잡블로그

[Rust] Deref를 구현할때는 고유 메소드를 피하라. 본문

개발 및 공부/언어

[Rust] Deref를 구현할때는 고유 메소드를 피하라.

NeuroWhAI 2018. 1. 21. 21:28


http://aturon.github.io/features/traits/common.html#avoid-inherent-methods-when-implementing-deref/derefmut-[fixme:-needs-rfc]



Avoid inherent methods when implementing Deref/DerefMut

The rules around method resolution and Deref are in flux, but inherent methods on a type implementing Deref are likely to shadow any methods of the referent with the same name.



Comments