Not really sure that does much – std::move() doesn’t really enforce anything much at compile-time (linters sometimes enforce things, eg clang-tidy’s bugprone-use-after-move). For example this change compiles fine:
0--- a/src/validation.cpp
1+++ b/src/validation.cpp
2@@ -3424,6 +3424,7 @@ bool Chainstate::ActivateBestChain(BlockValidationState& state, std::shared_ptr<
3 }
4 pindexNewTip = m_chain.Tip();
5
6+ auto x = std::move(connectTrace).GetBlocksConnected();
7 for (const PerBlockConnectTrace& trace : std::move(connectTrace).GetBlocksConnected()) {
8 assert(trace.pblock && trace.pindex);
9 if (m_chainman.m_options.signals) {```
Previously reusing GetBlocksConnected() would fire an assertion as the extra block has been removed; but I think with this PR it just invokes UB as blocksConnected is no longer in a valid state. So this largely seems worse than the existing code to me.
I think changing the name to be ConsumeBlocksConnected() without touching the semantics would probably work better than messing with std::move, but given the existing comment and assertion I don’t think changes here add much value at all.