Why does the instantiated method permite an argument with a shorter lifetime?

In general Rust opts for practicality, and I think most programmers expect lifetimes to "just work" wherever possible.

So as a counter-point, here's a case where subtype coercion is possible but isn't automatically applied. If you haven't witnessed the situation and aren't experience enough to understand it should be allowed, you'd probably never figure out to manually force the coercion.


References as arguments have to automatically subtype or reborrow anyway in order for the language to be tolerable, so after thinking on it for a moment, this would be the relevant documentation.

3 Likes