3 ms·
Does that proposal allow to express anything that can be expressed in Rust? That seems quite unlikely given the lack of syntax for lifetimes. It's still in the
by devit 5y ago
Does that proposal allow to express anything that can be expressed in Rust?
That seems quite unlikely given the lack of syntax for lifetimes. It's still in theory possible to infer them, but that would result in API instability and hard to decipher error messages.
Can you for instance have a function that given a reference to an hash table and a reference to a key returns a reference to the value corresponding to a key equal to the given one? (this requires the return value lifetime to be the same as the hash table lifetime, while the search key lifetime is unrelated)
Can you refactor code that takes multiple parameters by reference to taking by value a single structure including those parameters as fields with independent lifetimes?