Answering my own question: the code compiles just fine; this is a bug in RustRover's (2024.1 and 2024.2 EAP) borrow checker implementation.
Here is the false positive: