Welcome to the forum!
You’re in luck! The comptime semantics changed a while back, and mlugg wrote a post about how it works now: https://ziggit.dev/t/comptime-mutable-memory-changes/3702 (which explains the final = result part)
As for returning pointer to locals in inline fn in general, that currently works in the current compiler implementation, but is not legal