3 ms·
This is exactly one example why non-lexical lifetimes aren't a uniform positive: they do make the compiler more accepting of code that people think should "obvi
by dbaupp 10y ago
This is exactly one example why non-lexical lifetimes aren't a uniform positive: they do make the compiler more accepting of code that people think should "obviously" compile, but comes at the cost of weird situations where making a (somewhat) distant change results in errors.
Fortunately, these sort of errors should be all function-local and are of course all flagged at compile time. Assuming Niko's usual focus on high-quality error messages continues, I would expect this sort of situation to be fairly clearly explained by the compiler.