Hello, can you describe what status of NRVO in Rust today? Is it planned to make it a guarantee, so that unsafe code can rely on it, with pinning? Or maybe some core members are against it? Is there any work going on right now? Is there some [Pre-]RFC a about it? What are chances of a new one getting accepted?
Not party if the lang or compiler teams, but here is my understanding.
The general sentiment is against return value emplacement via a guaranteed optimization like N. This is based on the caveats seen in C++, namely that it can be difficult to enforce that NRVO or copy elision in general is being applied in a given case.
Instead they'd prefer some other way of accomplishing emplacement. Probably through a new language feature that has yet to be designed.
There are existing RFCs proposing solutions, some based on NRVO. But they've been open for a long time indicating there's not a ton of interest from the project (priorities elsewhere).