Re:The borrowchecker is what I like the least about Rust
by fpoling on Saturday July 19, 2025 @11:14PM
(#44621674)
Lifetimes for a function signature in Rust are never inferred from the function code. Rather Rust has implicit lifetime specs with straightforward rules to recover the explicit full signature.
[ Parent
| on HN ]
Re:The borrowchecker is what I like the least about Rust
by ChadNauseam on Sunday July 20, 2025 @02:41PM
(#44628036)
I was speaking about variance specifically. They are not inferred from function bodies, but I think it's fair to say that it's a soft violation of the golden rule because variance has a lot of spooky action at a distance (changing a struct definition can change its variance requirements, which then has ripple effects over all type signatures that mention that struct)