4 ms·
But it's not, the Output is Self not Self + 'static
by iopq 12y ago
But it's not, the Output is Self not Self + 'static
- pcwalton 12y agoI 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