Ah so this is expected behaviour of anonymous struct literals, thanks for the links.
As an aside: it seems a bit brittle that any non-const field would (silently) reduce the lifetime to local? Hopefully future zig gets some lifetime checks that would catch this kind of case at compile time though!