Clarifying questions regarding `consuming` parameters and the `consume` operator

Just curious, suppose compiler was able to tell that a defer closure only runs once, how would the above code work? According to SE-0390, nonescaping closure captures an immutablve value as a borrowing operation and a mutable value as a mutating operation. There isn't a way to capture a value as a consuming operation.