4 ms·
The feature was added way before 1.0, if you're talking about the documentation, then I have no idea. There is no way to call the overwritten `Animal::talk`.
by heinrich5991 11y ago
The feature was added way before 1.0, if you're talking about the documentation, then I have no idea.
There is no way to call the overwritten `Animal::talk`.
- jdub 11y agoI thought you could do this: Animal::talk(self);
- chrismorgan 11y agoThere is no such thing as `Animal::talk`. It does not exist. `Animal::talk` is purely shorthand for `<_ as Animal>::talk`, meaning that it is a specific type’s implementation of the `talk` method. In the case of `Animal::talk(dog)` where `dog` is of type `&Dog`, the `_` can be inferred to be `Dog`, and so `Animal::talk(dog)` is equivalent to `Dog::talk(dog)` and `<Dog as Animal>::talk(dog)`. The default implementation, if overridden, does not exist for the given type.
- deleted 11y ago[deleted]