Info
This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Disambiguation in size_of
Several situations often occur which result in ambiguities about the receiver or referent of method or associated function calls. These situations may include:
Multiple in-scope traits define methods with the same name for the same types
Auto-deref is undesirable; for example, distinguishing between methods on a smart pointer itself and the pointerโs referent
Methods which take no arguments, like default(), and return properties of a type, like size_of()
I really don't understand. Is the third point a subset of the first one? If yes, why is it separated? If not, what exactly does it mean? Why should that method have no arguments and return a property of the type? Could you provide examples for this?
6 posts - 4 participants
๐ท๏ธ rust_feed