3 ms·
I think you're misunderstanding what Self means in the definition of Neg. The Self is only there so that it is clear which type's "Output" is being referred to.
by pcwalton 12y ago
I think you're misunderstanding what Self means in the definition of Neg. The Self is only there so that it is clear which type's "Output" is being referred to. It doesn't establish any type/trait/lifetime relationship between the type of the receiver and the output type. It would be perfectly possible to implement Neg with a 'static output lifetime.
- iopq 12y agoYeah, I got it, people on IRC helped me understand that it's not casting it as `Neg`, it's casting the type as `Neg` for namespacing purposes